My script is telling me that an IntValue doesn't exist in a model when it does. I checked both server and client and confirmed the IntValue was there, I've tried WaitForChild and nothing worked. I just either got the error saying it didn't exist or Infinite time yield. I've searched online too, restarted roblox studio, turned on collab scripting, renamed the IntValue, deleted the IntValue and placed it back, and NOTHING worked! Please help!
(This is also a serverscript btw)
Also there's more code than this in the script but I shortened it to the important code and I don't believe the rest has anything to do with it.
if EValues.Floors.Value == 10 or EValues.Floors.Value == 20 then
local NFloors = game.ServerStorage.NPCFloors:GetChildren()
local RandomizedFloors = math.random(1, #NFloors)
local RandomFloor = NFloors[RandomizedFloors]
local CurrentFloor = Instance.new("Folder",game.Workspace)
CurrentFloor.Name = "CurrentFloor"
RandomFloor:Clone().Parent = CurrentFloor
print(RandomFloor.Name)
Timer.Value = RandomFloor:WaitForChild("Time").Value -- Errors here!
Audio.Value = 0
Intermission.Value = 0
Monitor.SurfaceGui.Floorname.Text = 'Floor Name: '..RandomFloor.Name
Monitor.SurfaceGui.Reset.Text = "There is a floor that's ongoing at the moment. If you reset to get back to the lobby or just came from the lobby you will not get Coins or Floors."
wait(Timer.Value)
Intermission.Value = 1
EValues.Floors.Value = EValues.Floors.Value + 1
Monitor.SurfaceGui.Floorname.Text = "Floor Name: None"
Monitor.SurfaceGui.Floors.Text = 'Server Floors: '..EValues.Floors.Value
game.ServerStorage.PlayerIntermission.Value = 1
wait(2.5)
Elevator.Monitor.Monitor.SurfaceGui.Reset.Text = "It is currently safe to reset to go back to the lobby without losing your reward for next floor. Get back to the elevator when Intermission is about to be over."
Audio.Value = 1
CurrentFloor:Destroy()
Timer.Value = math.random(45, 60)
wait(Timer.Value)
end

2 comments
yeah it hould :WaitForChild
Thanks a lot, I don't get why the 10 at the end of waitforchild made it work but it did!