Are "Local Parts" Possible?

How do I make it so that something is only visible by 1 player or something like a part is a different color to one player. Is this possible?

3 Likes

Do anything in a Local Script and it will be to the player only. Create parts, audio, recolor, you name it. If it’s on a Local Script, then only one player will see

3 Likes

It requires a LocalScript, manipulating things from the client, rather than the server. Don’t worry, the client will register the collision. This won’t cross between other clients. Make sure you’re parenting it correctly, or else it won’t work.

1 Like

I know this isn’t related to the post but can I ask what would happen if you put a local script in the workspace and created a part. Would no-one see it including the server?

1 Like

Ok I see! Thank you so much! I now understand what you mean.

1 Like

Parenting the script to the workspace would fail, as it is due to the script’s limitations.

A client can’t change another one’s LocalScript.

4 Likes

Wait is it possible to like clone something through a local script like the player itself on joining and no one else will see that clone other than the player it was cloned from?

1 Like

That might be possible, all you have to do is…

External Media
6 Likes

I am rn XD. Idk where I should put my local script though… Server Storage?

1 Like

Do you mean cloning the player or cloning the player’s character. If you want to clone the character you need to set it’s Archivable property to true.

1 Like

Put it in StarterGui or Player Scripts

1 Like

Char. This are words so i can send the message

1 Like

If you read the article above, it already showed different places where the script should function if parented correctly that way.

1 Like

PlayerScripts gocha! I’ll just do script.Parent.Character.Clone() and no function?

1 Like

You can’t clone the player’s Character unless you set it’s archivable property to true. It’s default Archivable is false, so you need to first set it to true:

3 Likes

You could get the local player’s character and clone that like so:

local player = game.Players.LocalPlayer
local character = player.Character

character.Archivable = true
local clone = character:Clone()
clone.Parent = game.Workspace
character.Archivable = false
1 Like

That isnt working. Look at my script.

local teleportTo = game.Workspace.CloneArea2


game.Players.PlayerAdded:Connect(function(player)
	wait(1)
	local player = game.Players.LocalPlayer
	local character = player.Character

	character.Archivable = true
	local clone = character:Clone()
	clone.Parent = game.Workspace
	character.Archivable = false
	clone.Name = "ClonedPlayer"
	print("Cloned.")
	--

	local humanoid = clone:FindFirstChild("Humanoid")
	if humanoid then
		local humanoidRoot = clone:FindFirstChild("HumanoidRootPart")
		if humanoidRoot then

		end
		humanoidRoot.CFrame = teleportTo.CFrame
	end	


	--


end)```

It doesn’t even print cloned. Thats your script.

Do not use Players.PlayerAdded on the client. When the client script runs, the player will already be available.

2 Likes

Is this in a server script? You can’t do LocalPlayer in a Server Scriptt.