Hello. I am making a game that each level is unlocked if the value is a certain value. Any working answer is appreciated. Here is my script.
local playerlevels = game.ReplicatedStorage.Values:WaitForChild("thelevels")
while true do
wait(1)
print("check complete.")
if playerlevels.Value == 1 then
game.Workspace.livingroom.bedroomdoor.bedroomdoor.ClickDetector.MaxActivationDistance = 15000
end
if playerlevels.Value == 2 then
game.Workspace.office.bedroomdoor.bedroomdoor.ClickDetector.MaxActivationDistance = 15000
end
if playerlevels.Value == 3 then
game.Workspace.basement.bedroomdoor.bedroomdoor.ClickDetector.MaxActivationDistance = 15000
end
if playerlevels.Value == 4 then
game.Workspace.attic.bedroomdoor.bedroomdoor.ClickDetector.MaxActivationDistance = 15000
end
end
Whenever I run the script, and change the value, it does not change the MaxActivDistance.

5 comments
game.ReplicatedStorage.Values line seems sus. I'm prob wrong
its the folder
ohhhh
Try doing game.Workspace.attic.bedroomdoor.bedroomdoor.ClickDetector.MaxActivationDistance == 15000. I don't think that its right, but try that
No, because that is used in an IF statement.