Part's physics behaves strangely when Size and Position altered using Local Script

The purpose of my script is to move a part to the position of the mouse (but elevated 50 studs), and gradually make it grow in size when mouse1 is being held down, and then making it stop growing and dropping when mouse1 is let go.
The script seems to work, except after the part is dropped it has very strange physics behavior such as:
Not falling right after Mouse1 is let go,
Having innacurate collision

Script:

local players = game:GetService("Players")
local runService = game:GetService("RunService")
local player = players.LocalPlayer
local mouse = player:GetMouse()
local special = game.Workspace.Special
local holding = false

mouse.Button1Down:Connect(function()
	holding = true
	runService.RenderStepped:Connect(function()
		if holding == true then
			special.Anchored = true
			if (player.Character.PrimaryPart.Position - mouse.Hit.Position).Magnitude <= 500 then --This isnt relevant for the help needed, and is for later
				workspace.Special.Position = mouse.Hit.Position + Vector3.new(0,50,0)
				special.Size = special.Size + Vector3.new(.1,.1,.1)
			end
		end
	end)
end)

mouse.Button1Up:Connect(function()
	holding = false
	special.Anchored = false
end)

Looks like a NetworkOwnership issue.
Network Ownership | Roblox Creator Documentation
NetworkOwnership | Roblox Creator Documentation

1 Like

I turned on ownership outlines and it does seem like when the part is on the clients network it is accurate, so I’ll try to make this script server sided and then mark this as the solution if it works, thank you in advance

1 Like

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