Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

OccludeAll isn't working?

Asked by
Prioxis 673 Moderation Voter
10 years ago

My script is having a problem the "OccludeAll" isn't working in studio it doesn't work or ingame when I have a friend follow me it doesn't work the way I want it too... I have the script in the starterGUI and its set as a localscript is that the reason why the OccludeAll isn't working?

game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:connect(c)
c:WaitForChild'Humanoid'.NameOcclusion = "OccludeAll"
end)

local plr = game.Players.LocalPlayer
repeat wait() until plr and plr.Character

local char = plr.Character
local head = char:WaitForChild("Head")
local sg = Instance.new("BillboardGui", char)
sg.StudsOffset = Vector3.new(0,1.5,0)
sg.Size = UDim2.new(1,0,1,0)
sg.Adornee = head

local txt = Instance.new("TextLabel", sg)
txt.BackgroundTransparency = 1
txt.TextColor = BrickColor.random()
txt.Font = "ArialBold"
txt.FontSize = "Size18"
txt.Text = plr.Name -- player name
txt.Size = UDim2.new(1,0,1,0)





0
I'm why, hold it, Ima post a fixed script. Bebee2 195 — 10y

1 answer

Log in to vote
2
Answered by
Bebee2 195
10 years ago

Remove the first two lines. You don't need those two events for this local script because of how it's placed. Also, the PlayerAdded event fails when using a local script. You don't need character added whatsoever.

Remove the end)at line 4 at the way down.

Move line 3 after line 9 and change the c in the line of line 3 to char.

Ad

Answer this question