hmm here is the lua please help script about run/walk gui
player = script.Parent.Parent.Parent.Parent bin = script.Parent function mb1d() if (bin.Text == "Walk") then bin.Text = "Sprint" player.Character.Humanoid.WalkSpeed = 16 else bin.Text = "Walk" player.Character.Humanoid.WalkSpeed = 50 end end bin.MouseButton1Down:connect(mb1d)
do bin.MouseButton1Click:Connect(function()
instead of using just a function Name()
I would provide a script, but I don't have studio opened, so I wouldn't know if it works. What I would do though, is something like this: make sure it is in a LocalScript in the "bin" (make sure bin is a TextButton or ImageButton)
local player = game.Players.LocalPlayer local bin = script.Parent run = false bin.MouseButton1Click:Connect(function() if run == false then player.Character.Humanoid.WalkSpeed = 50 run = true bin.Text = "Walk" elseif run == true then player.Character.Humanoid.WalkSpeed = 16 run = false bin.Text = "Sprint" end end)
This make it so when you are running, the text says walk, and running is true (a debounce). When you are walking ,the button says "Sprint." Hope this works, and if not, show me your new script with any errors in the Output.