i'm working on a multiplayer game with doom-style characters, and so far i've managed to attach a BillboardGUI to the player. the problem is that since i want to make it in first-person, the player's own sprite will end up blocking their vision. i figured that i could use the PlayerToHideFrom parameter for this, but i'm not sure how to match the BillboardGUI to the player it's welded to.
#getting the right PlayerToHideFrom
1 messages · Page 1 of 1 (latest)
If it's on a part, make it invisible
And if you're able to weld it to that player, you should have a way to put the player in that property, no?
the problem isn't that the player is visible, but that the BillboardGUI is visible to the player it's welded to
I've never mentioned anything about the players visibility
that's what im thinking, i'm just new to studio and don't know how to go about it
Send the code
You didn't make this did you
i followed a tutorial, yeah
** You are now Level 1! **
as i said, new to studio
i used this to weld a part to the player to use as a new collision box, and i figured out that i could attach the billboard to the player using that part
billboard ui, and the part is already invisible
PlayerToHideFrom needs a player as a value
yeah
i just gotta get the player
while making it work for all players individually
So on character added, you can just put BillboardUi.PlayerToHideFrom = PS:GetPlayerFromCharacter(character)
ill try that rq
having some trouble getting it to work, would you mind going into one of the vcs so i can stream it?
scratch that, i don't have stream permissions
You can probably just make that billboard gui your character
try replacing the starter character with it
ill try that
put a humanoid in it and turn off requires neck and head
i've created a copy of the game to test this out
** You are now Level 2! **
geniunley don't know what im doing, but now the player spawns in normally without anything attached as if it were any other roblox game
in StaterPlayer create a Model and name it "StarterCharacter" that has your billboard gui part in it, and a humanoid in there as well.
you might want to rename it to HumanoidRootPart and set the root property of your humanoid
this is what was happening before, but i'll try that now
it should completely override your character creation
is this what you meant?
uh
yeah where is your part tho
humanoid should be named Humanoid
you should have a part to put ur billboard in
dont make part a child of the humanoid
and rename it to HumanoidRootPart
but ye
getting better
it works now, but the original problem remains unsolved and now the cylinder used as the collision box is sideways
no worries
it'll be easier now
in your script in the CharacterAdded one
you're gonna want to do character:FindFirstChildWhichIsA("BillboardGui")
also the cylinder you're using for collision you can make the Part inside the startercharacter
the cylinder is currently under Humanoid and labelled as 'part'
i'll need a little further explanation to find this
this code here
ok
line 15 that's your characteradded funciton
local function characterAdded(character, player)
local billboard = character:FindFirstChildWhichIsA("BillboardGui", true)
billboard.HideFromPlayer = player
end
local function playerAdded(player)
player.CharacterAdded:Connect(function(character)
characterAdded(character, player)
end)
if player.Character then
characterAdded(player.Character, player)
end
end
Players.PlayerAdded:Connect(playerAdded)
for _,v in Players:GetPlayers() do
playerAdded(v)
end
should i put that in a new script or the existing one?
existing one
nothing seems to have changed
ok
** You are now Level 3! **
on this line, yeah?
ye
nothing's changed, and the PlayerToHideFrom is left blank
yes, i did
add local Players = game:GetService("Players") to the very top of the script
yeah
it was already defined in an earlier line but it was names PS instead of Players
that means there's a problem with it, if u mouse over it'll give you more info
it probably would say that Players is undefined in the current scope
which means u need to define it
ah gotcha
what i did is just replace the two instances of Players with PS and it worked properly
sure