I was trying to make a walk speed giving button for VIP members in my game but I wasn't having any luck.
✓ ANSWER ACCEPTED
How do I make a walk speed giving button?
1 answer
✓ Accepted answer
You'd need to use a LocalScript inside of a TextButton inside of a ScreenGui. Insert the following code in it:
local player = game:GetService("Players").LocalPlayer
script.Parent.MouseButton1Click:Connect(function()
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character.Humanoid
humanoid.WalkSpeed = 50 -- Change 50 to the WalkSpeed you want.
end)
The MouseButton1Click event fires when a player presses the button. Then the character variable waits for the character to load. Then finally, it changes the WalkSpeed of the humanoid. Also, this is not a request site, thank you.
This discussion is preserved as it was. New answers, comments, and votes are closed.
