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

I'm trying to make a game where a brick being touched changes humanoid's Walkspeed?

Hello, I am currently making a game that involves a brick being touched, when touched the individual player's walkspeed changes. Here's what I currently have. (I did insert a humanoid named 'StarterHumanoid')

script.Parent.Touched:Connect(function(hit)
	game.StarterPlayer.StarterHumanoid.WalkSpeed = 30
end)

Any help would be appreciated, thanks!

1 answer

✓ Accepted answer
script.Parent.Touched:Connect(function(hit)
  if hit.Parent:FindFirstChild("Humanoid") then
    hit.Parent.Humanoid.WalkSpeed = 30
  end
end)

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