-
What do you want to achieve?
I’d like for when my proximity prompt is triggered, it checks if 2 boolean values located in ReplicatedStorage are true and then proceeds with playing an animation. -
What is the issue?
The animation plays despite BOTH bool values being false, basically it does not care if the bools are false or true it just goes around the if-statement -
What solutions have you tried so far?
else statement OUTCOME: it just runs the else statement EVEN when the bool values are BOTH true
Nested IF-Statement OUTCOME: had the same issue
__UsedWaitForChild
when looking up the boolean values
-- THIS CODE IS A SERVER-SIDE SCRIPT INSIDE THE PROXIMITY PROMPT
local prox = script.Parent
local Replic = game:GetService("ReplicatedStorage")
prox.Triggered:Connect(function()
if Replic:WaitForChild("term1") == true then
if Replic:WaitForChild("term2") == true then
local doorHumanoid = game.Workspace:WaitForChild("DOOR").Humanoid
local anim = Instance.new("Animation")
anim.AnimationId = "http://www.roblox.com/asset/?id=13971995451"
anim.Parent = doorHumanoid
local track = doorHumanoid:LoadAnimation(anim)
track:Play()
task.wait(track.Length * 0.99)
track:AdjustSpeed(0)
end
else
print("No blud")
end
end)
I know for sure that the bools are true because I search them up in the explorer at runtime