Hello.
I need help with this server-script, in which it is suppose to replicate a BillboardGui above the players head. It successfully clones and works with every player, but it is only visible when the BillboardGui is cloned onto my head only.
function yellowCardFunction(player)
local yellowCardClone = yellowCard:Clone()
yellowCardClone.Parent = game.Workspace[player.Name].Head
end
function yellowCardDestroy(player)
game.Workspace[player.Name].Head:FindFirstChild("YellowCardGui"):Destroy()
end
function redCardFunction(player)
local redCardClone = redCard:Clone()
redCardClone.Parent = game.Workspace[player.Name].Head
end
function redCardDestroy(player)
game.Workspace[player.Name].Head:FindFirstChild("RedCardGui"):Destroy()
end
event.OnServerEvent:Connect(function(player,arg,arg2)
print(player)
print(arg)
print(arg2)
if arg2 == "insert" then
print("inserting")
for i,v in Teams.Referee:GetPlayers() do
frame = v.PlayerGui.UserPanel.Referee.NotepadGui.ScrollingFrame
insertGUI(player)
end
end
if arg2 == "YellowCard" then
yellowCardFunction(arg)
end
if arg2 == "RemoveYellowCard" then
yellowCardDestroy(arg)
end
if arg2 == "RedCard" then
redCardFunction(arg)
end
if arg2 == "RemoveRedCard" then
redCardDestroy(arg)
end
end)
1 Like
I still need help. Let me explain this problem more clearly.
Basically, if I use the GUI with Roblox on my client with multiple accounts, it’ll work. However, if the person running Roblox isn’t on my computer, then it won’t work.
This is what I mean
1 Like
Any help, I need help with this.
The way you presented the problem is confusing, but let me clarify:
When you click red/yellow flag button for a specific player, the billboard is supposed to go above that specified player’s head? or should it appear for all players? or is it just above the referee’s head?
There are some prerequisites that need to be confirmed:
- Can you make sure that each player is getting the billboard gui
- If so, can you make sure its not out of render range (ie, its not max 50 studs or something)
- The adornee property is set to the player’s head.
- Find out if there are any errors
1 Like
The billboard should just appear for the player who is teamed referee only.
- Yes, every player is getting the billboard gui and it it isn’t out of range.
When you click the ‘red flag’ button, does it send a remote event to the server with the correct parameters? If so, the billboard should be placed inside the head of whoever you put as the variable ‘arg’, which from the client would be the first parameter.
Next, in the explorer, can you confirm the following:
- the billboard is enabled
- the frame or image or whatever inside the billboard is visible, centered, and sized correctly
If you make the billboard go away on its own after a period of time, you can copy the billboard in the explorer before it gets removed and paste it back into the head so you can examine it for a longer period of time.
2 Likes