Tween on client being replicated to server & other clients?

I have a RemoteEvent that fires from the server and activates a tween on the client, however the tween is replicated to all other clients and the server. I fear that it may cause performance issues so I’m wondering why this is happening.

Code:

-- This code is inside a .OnClientEvent function
-- The RemoteEvent is fired by a ServerScript
		for objectNumber, object in pairs(objects) do
			local t = TS:Create(object,TweenInfo.new(duration),{Transparency = values[objectNumber]})
			t:Play()
		end

do you want it to show on a single client or all of the clients?
if a single client then

Remote:FireClient(player)

if for every client then

Remote:FireAllClients()

It could possibly have something to do with network ownership. The client you sent it to may have ownership over the part getting tweened

1 Like

part:SetNetworkOwner(nil) should do the trick. Using nil sets the part to the server.

Yeah depending on where they are the server should have ownership though if they are in the radius of the player then it will change ownership. The only reason I could think of apart from this is that you are firing it to all clients.

Yeah, so the issue must be the network ownership I’m assuming. Not really sure what else it could be.

Can you show me the script where you set the ownership to nil?

Sorry for the late reply. As long as you are disconnecting the heartbeat you should be fine.

1 Like

Well, it shouldn’t be, you may be lagging or the spin speed is set to a high number meaning it looks choppy.