How do I make client-sided object?

It works now, however, other people can collide with each other’s objects.

1 Like

They should not. This needs to be in a localscript.

They are though.
[30 Characters]

This is a test where one client clones a part and parents it to workspace.
As you can see, Player1 cannot collide with the part nor see it.

Is it because I have player collisions on?

What are we talking about here? The cloned instance or the characters being able to collide?

What I would do is: Create the part in workspace

Then I would create a folder in StarterGui for client scripts
image

this is the script I have in the client

while true do
	game.Workspace.SpinBlock.Orientation = game.Workspace.SpinBlock.Orientation + Vector3.new(0,5,0)
	wait(0.1)
end

I was thinking players colliding with each other.

Then that’s a completely different matter, also off-topic considering your initial question. Though you would want to check out “Player-Player Collisions”.

1 Like

The brick in grey was originally standing up, and now it isn’t, due to another player knocking it over. I don’t know why it happened.

image

I tried running it again, and I still had the same issue.

1 Like

Are you positive that this is because of the other player and not the gravity? Setting the Anchored property for the object to true should fix it whatsoever.

Can you specify what issue you mean? Considering you’ve been talking about two different things back and forth?

Here’s a gif:

https://gyazo.com/d85d8c2f97b4ac1d4735901303195809

There is a player affecting another player’s client object.

Then that is not done using a localscript as I said. That’s a server-sided object.

I just checked again and in studio it says it’s a local script.
image

However, the part is still server-sided. Can you check if there’s a server script cloning it as well?

There is no server script cloning.

What’s your code currently? Only thing I can think of is that the object is never cloned, and just a part in workspace from the beginning considering both players can see and interact with it (which makes it server-sided as well).

local LocalModel = game.ReplicatedStorage:WaitForChild("Model"):Clone()

LocalModel.Parent = workspace

It’s the one we started with.