Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make someones walk speed zero?

Asked by 5 years ago

I was trying to make a game and i'm trying to make the person walk speed when they are in a certain point in a game or when text appears on screen at a certain point. By the way i'm pretty nooby at scripting so forgive me if I make simple mistakes.

I also put the local script into StarterPlayer so if I also got that wrong then please forgive me.

if game.StarterGui.Intro.Frame.Visible == true then script.Parent.CharacterWalkSpeed = 0 end

1 answer

Log in to vote
0
Answered by
0_2k 496 Moderation Voter
5 years ago

Inputting a Local Script into StarterGui will do the trick here

local plr = game.Players.LocalPlayer
local pGui = plr:WaitForChild("PlayerGui")
local char = plr.Character or plr.CharacterAdded:Wait()

if pGui.ScreenGui.Frame.Visible == true then -- the check you please
    char.Humanoid.WalkSpeed = 0 -- the speed you please
end -- closing the if statement
0
Thank you for your help! ScriptToon 70 — 5y
Ad

Answer this question