Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why doesn't the textlabel move?

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!!!

2 comments

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...

0

i have 9 + 10 == 21 as my A) signature and B) I have it to automatically do that... so... NO! XD

1 answer

✓ Accepted answer

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

1 comment

0

THANK YOU SO MUCH!!!

This discussion is preserved as it was. New answers, comments, and votes are closed.