Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to properly make a part local?

I'm a bit new to making it so only a player can see that specified part. The current script I have is a local script in Workspace. It's supposed to clone a brick and put it into the player's CurrentCamera. Of course this script is only so I know how to properly use this. I have a plan that involves this, so any tips? No output errors.

a = game.Lighting.Part

game.Players.PlayerAdded:connect(function(p)
	repeat wait() until p.Character
	a:clone().Parent = game.Workspace.CurrentCamera
end)

2 answers

✓ Accepted answer

You will need to use this in a local script inside the player.

a = game.Lighting.Part
plr = game.Players.LocalPlayer
cam = Workspace.CurrentCamera

a:Clone().Parent = cam

As an alternative

2 comments

0

So, I would need to parent this script to the player?

0

Mhm, or playegui. Since local parts and camera needs to be client side.

Or just put this inside of a local script in StarterGui or StarterPack:

Instance.new('Part', Workspace.CurrentCamera)

Which makes a part only there character can see.

This discussion is preserved as it was. New answers, comments, and votes are closed.