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?
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
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.
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?
Ok I see! Thank you so much! I now understand what you mean.
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.
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?
That might be possible, all you have to do is…
External MediaI am rn XD. Idk where I should put my local script though… Server Storage?
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.
Put it in StarterGui or Player Scripts
Char. This are words so i can send the message
If you read the article above, it already showed different places where the script should function if parented correctly that way.
PlayerScripts gocha! I’ll just do script.Parent.Character.Clone() and no function?
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:
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
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.
Is this in a server script? You can’t do LocalPlayer in a Server Scriptt.