|
WrathsongJoin Date: 2012-07-05 Post Count: 22393 |
define something |
|
digpoeJoin Date: 2008-11-02 Post Count: 9092 |
filteringenabled |
|
|
Like for instance when new person joins the game.
He is only one that can see it |
|
|
in it I mean a certain part
so function new player joins
instance.new blah bs
Now how can i make new player be only one to see new instance part |
|
WrathsongJoin Date: 2012-07-05 Post Count: 22393 |
"define something"
define "it" |
|
drgn42Join Date: 2010-02-11 Post Count: 3231 |
Put the part in the local camera. |
|
|
Yes, for instance, if you want a GUI to appear, you make the GUI using instances in scripting. But instead of using a script, you would use a LocalScript.
Script is for the entire server, localscript is for individual people.
To put an ls into perspective, if you want a gui to appear when you click on a brick but only for the person who clicked it, you would script the brick using a localscript. If you used a regular script, the GUI would appear to everyone. |
|
|
^ how would I do that? and would that make the part the only visible to that player |
|
|
You could do the instance in a local script |
|
|
^ my previous comment was directed @drgn42
I don't need a gui
I need a part to be visible to local player only |
|
|
@drgn like this?
function onPlayerEntered(newPlayer)
game.ServerStorage.LocalBrick:Clone().Parent = newPlayer.Character.Camera
end
game.Players.PlayerAdded:connect(onPlayerEntered) |
|
|
...Again, just use a local script :l
put this in the ls:
Instance.new("Part", game.workspace) |
|
|
^ I can't really because its very unique union meshy thing and instance.new can't really
But in retrospect how do I even get the players camera/
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
game.ReplicatedStorage.LocalBrick:Clone().Parent = character.Camera
end)
end) |
|
|
Did it thanks guys
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
game.ReplicatedStorage.LocalBrick:Clone().Parent = game.Workspace.CurrentCamera
end)
end)
|
|
lostendJoin Date: 2011-08-21 Post Count: 8265 |
^not going to work
clone it in a local script and put it in workspace. make sure filteringenabled is on |
|
|
Lol you were right so what do I do
while wait() do
plr = game.Players.LocalPlayer
if CurrentCamera.LocalBrick = nil then
game.ReplicatedStorage.LocalBrick:Clone().Parent = game.Workspace.CurrentCamera
end |
|
|
|