Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to change the player's walkspeed after he touch the part?

So like the main thing is when player touch the part, his walkspeed turns into 64

I already did a code, but it isn't work, pls help

game.Workspace.part.Touched:Connect(function(hit) game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 64 end)

2 comments

0

I'll test

0

y'know its alot easier if u just put script.Parent instead of game.Workspace.part

1 answer

✓ Accepted answer

I know the problem you are using a "game.Players.LocalPlayer.Character.Humanoid.Walkspeed = 64" though is only for local script but i don't know how to do it in local script but i do know how to do this in script. Here's the prefix.

local part = game.Workspace.Part
part.Touched:Connect(function(hit)
	if hit.Parent:FindFirstChild("Humanoid") then
		hit.Parent.Humanoid.WalkSpeed = 64
	end
end)

if it doesn't work put the script inside the part and change this:

local part = game.Workspace.Part

to

local part = script.Parent

2 comments

0

Tysm, lo_1003, you helped me so much

0

You should accept their answer

This discussion is preserved as it was. New answers, comments, and votes are closed.