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

Why doesn't the textlabel move?

Asked by 9 years ago

I have this GUI, when the player moves, it multiplies the players position by 0.001 and then that is the x, and same thing for the y of the textlabel, i am not getting any syntax errors, the only output i am getting is the coordinates of the textlabel (which don't change) here is the script

local px = PX
local pz = PZ

repeat
    wait(1)
    print (script.Parent.Parent.Parent.Parent.Parent.Character.Torso.Position.X)
PX = script.Parent.Parent.Parent.Parent.Parent.Character.Torso.Position.X
PZ = script.Parent.Parent.Parent.Parent.Parent.Character.Torso.Position.Z
print("locals made")
until 9 + 10 == 21

repeat
    wait(0.1)

script.Parent.Position = UDim2.new(px*0.001,0,pz*0.001,0)
print("position found")
until 9 + 10 == 21

Please help!!! Thank you!!!

1
Don't say silly things like `9 + 10 == 21`. Just say `false`. At the least you could have written `18 == 21` or maybe more reasonably `1 == 2`... BlueTaslem 18071 — 9y
0
i have 9 + 10 == 21 as my A) signature and B) I have it to automatically do that... so... NO! XD yogipanda123 120 — 9y

1 answer

Log in to vote
0
Answered by 9 years ago

You aren't changing the px and pz variables except for the initial declaration.

repeat
    wait(0.1)
    local px = script.Parent.Parent.Parent.Parent.Parent.Character.Torso.Position.X
    local pz = script.Parent.Parent.Parent.Parent.Parent.Character.Torso.Position.Z
    script.Parent.Position = UDim2.new(px*0.001,0,pz*0.001,0)
until 9 + 10 == 21
0
THANK YOU SO MUCH!!! yogipanda123 120 — 9y
Ad

Answer this question