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

Help flix 2 lines of code that dont work im not good with coordiantes so please help?

Asked by 4 years ago

hey, im trying to make some code work, but its not working, its about position and stuff and I'm not really good with coordiantes

here's the code

    local pos = script.Parent.Parent.Rod.Position
    script.Parent.Parent.Rod.Position = Vector3.new(pos)

there's other things in the script but that's irrelevant, this is where the problem is

1 answer

Log in to vote
0
Answered by 4 years ago

You already stored the position of the part in your variable pos, which means you do not have to construct a new Vector3. That being said, I don't really know what you're trying to achieve. This is literally just going to set the position to what it already was before. Regardless, here's the fixed code:

local pos = script.Parent.Parent.Rod.Position
script.Parent.Parent.Rod.Position = pos
0
thank you 123jangamer321 28 — 4y
Ad

Answer this question