#code help

1 messages · Page 1 of 1 (latest)

teal juniper
#

so i made a code that is if Config.Move = Flase then the character cant move but dosnt work(its inside rig because the player can switch his avatar to the rig)
local humanoid = script.Parent:WaitForChild("Humanoid")
local config = script.Parent:WaitForChild("Config")
local moveValue = config:WaitForChild("Move")

local originalWalkSpeed = humanoid.WalkSpeed

local function updateMovement()
if moveValue.Value == false then
humanoid.WalkSpeed = 0
else
humanoid.WalkSpeed = originalWalkSpeed
end
end

updateMovement()
moveValue:GetPropertyChangedSignal("Value"):Connect(updateMovement)

stray pecan
#

what is config

atomic storm
#

if that doesnt work try
moveValue.Changed