In my script, I'm trying to make a union move up 0.5 every 0.1 seconds. (Might change that later). I use CFrame.new, and I'm using a for i=1, 64 loop to make it repeat and so I can track the new position of the part. I have a pre-made physical variable in the workspace in a folder called VAR, the variable is a BoolValue and it is called watertime. However, when I use .Changed , the script doesn't run at all. I've tried it with while loops and looked at RemoteEvents, but I just can't get my head around RemoteEvents. The code is attached below, I would be incredibly thankful if you could help!
wait(1)
game.Workspace.VAR.watertime.Changed:Connect(function()
print("sup")
while true do
if game.Workspace.VAR.watertime.Value==true then
print("Im so loved")
for i=1,64 do
wait(0.1)
script.Parent.Position=CFrame.new(0,script.Parent.Position+0.5,0)
end
else
print("nous")
wait(1)
end
end
end)

2 comments
Don't use polling.
I have no clue what polling is ????