I have a local script that creates a part. The player can click a billboard GUI that lets them drag that part around.
When I try to do this: Object.Position = Position the object’s position doesn’t change. The print() function says that the object’s position has changed, but visually it didn’t. Going to the explorer says that the position didn’t change. It doesn’t even trigger the Changed event! Please help I can’t figure this out.
Can you show us an the part of the script that you are getting that problem?(There is no need to take a screenshot, just use the block code and the code.)
MoveGui.MoveHover.MouseButton1Down:Connect(function()
MovingArrow = Arrow
local Connection; Connection = UserInputService.InputChanged:Connect(function(Input, success)
if Input.UserInputType == Enum.UserInputType.MouseMovement then
local MousePosition = UserInputService:GetMouseLocation()
local ray = Camera:ScreenPointToRay(MousePosition.X, MousePosition.Y)
local MouseLine = Lines.new(ray.Origin, ray.Direction)
local Closest1 = MovementLine:FindClosest(MouseLine)
local CurrentPosition = MovementLine:GetMagnitude(Arrow.Position)
if MovingArrow then
Arrow.Position = MovementLine:GetPosition(math.floor(Closest1))
print(Arrow.Position)
else
Connection:Disconnect()
end
end
end)
end)
Arrow:GetPropertyChangedSignal("Position"):Connect(function()
print("It has moved!")
end)
The .Changed event does’t fire because that’s actually intended, roblox doesn’t make it fire for properties that are supposed to change at a very fast rate such as Position and CFrame. For the other stuff, since this is a local script, thus the part’s position only changes locally, it won’t replicate to the server, so my question is: are you viewing this from the server?