How to make a Local script have effect over a Server script

So I have a server and a local script both setting a part to trail behind the player. If I disable the server script, the part updates much smoother. But this also means that other players can’t see the part being moved. Is there a way to make the player only see the effects of a local script?

server:

game:GetService("RunService").Stepped:Connect(function()
			local goal = Vector3.new(math.floor(script.Parent.Parent.PrimaryPart.Position.X),0.5,math.floor(script.Parent.Parent.PrimaryPart.Position.Z))
			puddle.Position = puddle.Position:Lerp(goal,trailAlpha)
		end)

Client:

game:GetService("RunService").RenderStepped:Connect(function()
		puddle.Position = puddle.Position:Lerp(Vector3.new(script.Parent.Parent.PrimaryPart.Position.X,0.5,script.Parent.Parent.PrimaryPart.Position.Z),trailAlpha)
	end)

You would have to create the part on the server & then give the player NetworkOwnership over the part, then when you move it in the local script it should replicate to other players

https://create.roblox.com/docs/reference/engine/classes/BasePart#SetNetworkOwner

Ah but the part needs to be unachored, I’ll still try it though

Do you mean the part needs to be anchored?

You could try using BodyMovers or MoverConstraints to negate the effect of gravity or just set the position that way

Uh so there’s another problem, I set NeworkOwnership to the player but it still doesn’t update for the server

sorry never mind I fixed it. I’ll mark your answer as the solution

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