I was trying to make a sliding door that opens when ServerStorage.ElevatorValues.Easy.Intermission.Value == 60 but for some reason my script doesn't detect the value in the serverstorage? (I've Tested the door and it works fine, Changing the serverstorage value also works fine, This script is a server script in a part which is in the workspace) The script doesn't print("test") or test2. Here is the script:
wait()
local ServerStorage = game:WaitForChild("ServerStorage")
local ElevatorValues = game:WaitForChild("ElevatorValues")
local Easy = game:WaitForChild("Easy")
local Intermission = game:WaitForChild("Intermission")
while wait() do
if ServerStorage.ElevatorValues.Easy.Intermission.Value == 60 then
print("test")
for i = 1, 100 do
wait()
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0, 0.1, 0)
end
end
if ServerStorage.ElevatorValues.Easy.Intermission.Value == 10 then
print("test2")
for i = 1, 100 do
wait()
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0, -0.1, 0)
end
wait(3)
end
end
If you know why this is happening please let me know!

1 comment
Your local ElevatorValues WaitForChild is looking for a directory called ElevatorValues, I assume its supposed to be Local ElevatorValues = ServerStorage:WaitForChild("ElevatorValues") right? Anyway, the script won't run because it's waiting for that child