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

why does the coordinate get set back to 0 after going to the right position?

Asked by 5 years ago
Edited 5 years ago
-server script
newPart.Parent = script.Parent
--local script
local MH = Vector3.new( ( math.floor(mouse.Hit.X+0.5)),( math.floor(mouse.Hit.Y+0.5)),( math.floor(mouse.Hit.Z+0.5)))

local Part = script.Parent:WaitForChild("Part",100)

Part.Parent = workspace
Part.Position =  (MH)

ive made a part using a remoteevent on a server script using the client to server script here https://developer.roblox.com/en-us/articles/Remote-Functions-and-Events

both the local and server script are under a tool that activates the local script when used, the server script then makes the part under the tool. The local script is waiting for a part under the tool so that it can do the script above to it,

the part made is a local part when it should be global because it's from a server script and appears to goes to the right place but it goes to 0,0,0 instantly after being spawned

1
Could you be a bit more descriptive? Psudar 882 — 5y
0
It might be colliding with an instance, try using `CFrame` rather than `Position`; `.CFrame = CFrame.new(MH)` EpicMetatableMoment 1444 — 5y
0
what do you mean by colliding with an instance, i tried doing that but it still didn't work flireferret 26 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

i just realized the second tutorial on the site was for this https://developer.roblox.com/en-us/articles/Remote-Functions-and-Events

Ad

Answer this question