So I created a (local)script that places a billboard GUI above your head with some text on it. The problem is, you can only see your billboard GUI and no one else's due to it being placed in a localscript.
I'm pretty sure everything in the script is regular script compatible, but this one line of code is blocking me from placing it in a regular script and I do not know of an alternative for it:
player = game.Players.LocalPlayer
If you'd like to see the script in its entirety:
player = game.Players.LocalPlayer
character = player.Character
script.Parent.FocusLost:connect(function()
local bg = Instance.new("BillboardGui")
bg.Parent = character.Head
bg.Size = UDim2.new(1, 0, 1, 0)
bg.StudsOffset = Vector3.new(0, 2, 0)
local frame = Instance.new("Frame")
frame.Parent = bg
frame.Size = UDim2.new(1, 0, 1, 0)
frame.BackgroundTransparency = 1
local text = Instance.new("TextLabel")
text.Parent = frame
text.Position = UDim2.new(0.25, 0, 0.25, 0)
text.Size = UDim2.new(0.5, 0, 0.5, 0)
text.Text = script.Parent.Text
text.BackgroundTransparency = 1
text.TextColor3 = Color3.new(1, 1, 1)
text.Font = "ArialBold"
text.FontSize = "Size24"
end)
tl;dr: What is a regular script compatible alternative version to LocalPlayer?

7 comments
Hi BlueTaslem, thank you for responding quickly. I don't really understand what you mean by putting the script in the Player. Could you try to explain a little more and a few more examples? Thank you :)
Edited to be more specific!
Hey BlueTaslem, thanks alot for editing your answer - it worked perfectly! Problem is, only in solo mode. I think someone showed me a quick fix for this problem, but I can't seem to remember, or maybe I'm just dreaming about it haha. Do you have a suggestion to fix this problem?
Check again, and check the output online (F9)
I couldn't find the fix someone told me. D:! I checked the online output, and nothing showed except for roblox links highlighted in red with the sentence "The parameter is incorrect." Also, can we use the ROBLOX PM system to contact each other? I think it'd be easier .
Sure, you can PM me about finer details
Okay, message sent! :D