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

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

-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

3 comments

1

Could you be a bit more descriptive?

0

It might be colliding with an instance, try using CFrame rather than Position; .CFrame = CFrame.new(MH)

0

what do you mean by colliding with an instance, i tried doing that but it still didn't work

1 answer

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