This is a server script in a gui and I want it so when the value turns 1 then the code runs, why isn't it working should I use a remote event instead
if game.Workspace.Map1.ClickTele.Map1.Value == 1 then
-- my code
end
This is a server script in a gui and I want it so when the value turns 1 then the code runs, why isn't it working should I use a remote event instead
if game.Workspace.Map1.ClickTele.Map1.Value == 1 then
-- my code
end
Hello There.
Solution:
You can connect a function to when the value of "Map1" gets changed, then it will check if the value is equal to 1.
Fixed Code:
game.Workspace.Map1.ClickTele.Map1:GetPropertyChangedSignal("Value"):Connect(function()
if game.Workspace.Map1.ClickTele.Map1.Value == 1 then
-- Your Code Here
end
end)
Thx
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
Nah I removed my code because it is 2,000 lines long, so I put -- my code