Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why does this script work in studio but not in-game?

Asked by 9 years ago

So this is supposed to make my ImageLabel move up and down over and over, it works in studio, but not in-game. Here is the script:

while true do
    for i = 1,10 do
        wait()
        script.Parent.Position = script.Parent.Position + UDim2.new(0,0,.01,0)
    end
    wait(.25)
    for i = 1,10 do
        wait()
        script.Parent.Position = script.Parent.Position - UDim2.new(0,0,.01,0)
    end
end

1 answer

Log in to vote
1
Answered by 9 years ago

The most common reason things like this happen is that you are using a regular script to manipulate things on the client -- like GUIs -- when you should be using a local script instead.

Ad

Answer this question