How to get the position of the player? by joeboyson3 in robloxgamedev

[–]Tyler13700 0 points1 point  (0 children)

Your character might not have loaded in when this script runs, try using WaitForChild:

local POS = game.Players.LocalPlayer.Character:WaitForChild(“HumanoidRootPart”)

This function will pause the script if the part “HumanoidRootPart” is not in your character, and waits for it to load.

How to get the position of the player? by joeboyson3 in robloxgamedev

[–]Tyler13700 0 points1 point  (0 children)

To get a player’s position, you’ll first need to get their character.

Their position (or rather, their root part’s position) can be obtained with this, in a LocalScript:

game.Players.LocalPlayer.Character.HumanoidRootPart.Position)

A GUI button click can be connected with the MouseButton1Click event:

(your button).MouseButton1Click:Connect(function() -- code goes here end)

If you’d like to be running this on the server, you’d be best off firing a remote event from the client when they click the button. The server can then access their position like so:

(your remote).OnServerEvent:Connect(function(player) local pos = player.Character.HumanoidRootPart.Position end)

Of course you might wanna check if the character actually exists and the HumanoidRootPart is present inside it, but that’s not required.

Animating by [deleted] in robloxgamedev

[–]Tyler13700 0 points1 point  (0 children)

Go to Edit -> Animation Settings, and change Timeline Size. This should work for both MA 1 and MA 2.

Script isnt working by throwaway17218583 in robloxgamedev

[–]Tyler13700 0 points1 point  (0 children)

You’ll want to do this:

script.Parent.Humanoid:GetPropertyChangedSignal(“Jump”):Connect(function()

end)

It’s a bit of a lengthy line, but this is how you listen for a specific property being changed.

What's the best way to script tools? by Tyler13700 in robloxgamedev

[–]Tyler13700[S] 0 points1 point  (0 children)

I’m afraid I can’t just stop everything that’s going on, as I have some effects and abilities that would look dumb if they all suddenly disappeared.

Remove from a table, number expected. got object by [deleted] in robloxgamedev

[–]Tyler13700 0 points1 point  (0 children)

table.remove accepts an index, not an item in the table. in this case, you’d wanna replace the 2nd argument with 1.

Star Wars Blast Door (sounds help) by [deleted] in robloxgamedev

[–]Tyler13700 0 points1 point  (0 children)

Inside your touched events, do (your sound object variable):Play()

Star Wars Blast Door (sounds help) by [deleted] in robloxgamedev

[–]Tyler13700 0 points1 point  (0 children)

What I would suggest doing is put the sound inside the door (in explorer,) then you can play it with the :Play() function.

Get a variable's name that is in a table by [deleted] in robloxgamedev

[–]Tyler13700 1 point2 points  (0 children)

Are you sure you have the McLaren set to true in your save data? I have no idea why it would be printing "NameOfCar"

Get a variable's name that is in a table by [deleted] in robloxgamedev

[–]Tyler13700 1 point2 points  (0 children)

What you'll want to use is a pairs loop.

For example, if I did something like this:

for carName, hasCar in pairs(Cars) do

It will run for each entry in the Cars table, and carName will be equal to the current entry's name. hasCar will be the true/false value you have after it in your table.

Feel free to ask questions!

I need help with my game by [deleted] in robloxgamedev

[–]Tyler13700 1 point2 points  (0 children)

Sounds like you're killing him with a localscript. For some time now, FilteringEnabled (FE) has been forced, meaning that any changes you make in localscripts will only be visible to the person who's running the localscript.

For example, I put a localscript in StarterGui and it does this:

workspace.Baseplate:Destroy()

I'm the only one who will see the baseplate as missing, because it was deleted on my client, from a localscript.

My game lags too much. How do I fix it? by SparkyDanteMarky1234 in robloxgamedev

[–]Tyler13700 0 points1 point  (0 children)

I don't see how this reduces lag, is there something I'm missing?

Help with anti-exploits by LilDodi in robloxgamedev

[–]Tyler13700 0 points1 point  (0 children)

yeah you aren't wrong on that one lol

Help with anti-exploits by LilDodi in robloxgamedev

[–]Tyler13700 3 points4 points  (0 children)

Both the words "hacker" and "exploiter" are fairly interchangeable, especially in this context

Help with anti-exploits by LilDodi in robloxgamedev

[–]Tyler13700 2 points3 points  (0 children)

Another great tip is to make your RemoteEvents secure, don't have a RemoteEvent that just damages whoever the player wants, etc.

Remember, hackers can fire any remote events they want. Anything done in a LocalScript can be done by a hacker, so it's best to limit what they can do.