So, I’m basically trying to set a variable false in a loop but it isn’t working and I need to use a loop for this anyways around this?
CODE
while Controls.up == 1 do
game:GetService("RunService").Stepped:Wait()
local UpRay = Ray.new(humrp.Position, humrp.CFrame.lookVector * 5)
local hitfront, position = game.Workspace:FindPartOnRayWithIgnoreList(UpRay, {head,humrp,hat})
if not hitfront then
print("There is nothing here.")
hum:LoadAnimation(ClimbAnimations.Ledge):Play()
repeat game:GetService("RunService").Stepped:Wait()
Controls.up = 0 and print('sdfgsdf')
until Climbing == false
wait(1.1)
Climbing = false
print(Climbing)
climb:Destroy()
hum.PlatformStand = false
local Ledge = TweenService:Create(humrp, TweenInfo.new(.5), {CFrame = humrp.CFrame + Vector3.new(0,1.2,-3.5)})
Ledge:Play()
end
end
You’re repeating until Climbing is false, but you are setting it to false afterwards (meaning it never gets set to false). I’m not sure what your script is meant to do but I’m pretty sure this is the probable reason.