RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"make a button to switch between running and walking"
-- local script local button = script.Parent local Player = game:GetService('Players') local running = false local function switch() local player = Player.LocalPlayer local humanoid = player.Character.Humanoid if running then running = false button.Text = 'Run' humanoid.WalkSpeed = 16 else running = true button.Text = 'Walk' humanoid.WalkSpeed = 8 end end button.MouseButton1Click:Connect(switch)