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

Can't set value?

Asked by
Xianon 105
9 years ago

I'm trying to move a text button, but it always output can't set value. Gosh i'm failing at the simple stuff...

local settings = script.Parent
local graphics_q = script.Parent.Parent.Graphics_Q
settings.MouseButton1Click:connect(function()
    for i=0, 210 do
        graphics_q.AbsolutePosition = Vector2.new(i,0)
        print("Sucess")
        wait(0.40)
    end

end)

1 answer

Log in to vote
1
Answered by 9 years ago

That is because AbsolutePosition is a Read Only value. You can check the value but if you try to set it, it will error out. Read more at the wiki page

0
Thank you wise man with a beard... Xianon 105 — 9y
0
No problem! Also if you want to move it around, you may want to try changing the Position of the object or to look up how to use :TweenPosition on the wiki (that way you do not need to use a for loop) VariadicFunction 335 — 9y
Ad

Answer this question