Im trying to make a script that detects if the number value I have provided it with is above a certain number. This is the code:
game.Workspace.gameCore.Data.coreTemp.Value.Changed:connect(function(alert)
if game.Workspace.gameCore.Data.coreTemp.Value > 2400 and script.played.Value == false then
-- Oh noe! Its above the threshhold!
elseif game.Workspace.gameCore.Data.coreTemp.Value <= 2400 then
-- Phew. Its back to normal.
end
end)
Ive checked and the locations of everything is correct. Im not sure why its not working. The output is:
Attempt to index field 'Value' (A number value)

1 comment
Yup, it worked. That makes so much more sense. Thanks!