Is it Possible to get part's position in Workspace from local Script

Im not getting part’s position using a local script in output. and I Have to use wait for child to get part from a workspace. And three weeks ago I could get it without using it.

123

5 Likes

try using .CFrame instead of Position. If that doesn’t work maybe use a remote event to do it in a server script.

2 Likes

It takes time for instances to load for the player when they first join, so using :WaitForChild() is pretty necessary.

2 Likes

Try using part.CFrame.Position instead

1 Like

:WaitForChild() probably doesn’t yield that much if you don’t want it to yield - probably unnoticable. It does have to be required however since assets have to “replicate” or load for the client. Try double-checking the name of the part itself and see if you’re using the right one at least.

P.S your situation seems unclear - I’m pretty sure your code does the job. Try yielding with wait() before everything and see if it works.

2 Likes

Thanks, everyone My code is working now after restarting my computer.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.