I want, when i activate the tool via a serverevent, to change the text in a billboardgui. I Tried to change the locals and double checked it all, but it still doesn’t work. There’s no errors whatsoever.
Edit: It works in the dev console.
script.Parent.OnServerEvent:connect(function(lp)
local Humanoid = lp.Character.Humanoid
Humanoid.MaxHealth = Humanoid.MaxHealth + 0 -- only edit this line
local armour = script.Parent.Parent:WaitForChild'ARMOUR'
for i,p in pairs(lp.Character:children()) do
if armour:FindFirstChild(p.Name) and p:IsA'BasePart' or 'Meshpart' then
local x=armour:FindFirstChild(p.Name)
for i,v in pairs(x:children()) do
if v.Name ~= 'MainPart' then
local c=v:clone()
c.Parent=lp.Character
c.Anchored=false
local b=Instance.new('Weld',c)
b.Part0=c
b.Part1=p
b.C0=v.CFrame:inverse()
b.C1=x.MainPart.CFrame:inverse()
end
end
end
end
script.Parent.Parent:Destroy()
end)
script.Parent.OnServerEvent:connect(function(hit)
local facee = hit.Character.Head.face
facee.Texture = "0"
end
)
script.Parent.OnServerEvent:connect(function(it)
local it = it.Character:GetDescendants()
for i=1, #it do
if it[i]:IsA("Accessory") then
it[i]:Destroy()
end
end
script.Parent.OnServerEvent:connect(function(hit)
local color = hit.Character:GetDescendants()
for i=1, #color do
if color[i]:IsA("Part") then
color[i].BrickColor = BrickColor.new("Black")
end
end
script.Parent.OnServerEvent:connect(function(it)
local dooodle = it.Character.AlbOverhead.BillboardGui
dooodle.NameLabel.Text = ('SPECTOR')
dooodle.RankLabel.Text = ('//: SPECTOR')
end)
end)
end)
But especially this part:
script.Parent.OnServerEvent:connect(function(it)
local dooodle = it.Character.AlbOverhead.BillboardGui
dooodle.NameLabel.Text = ('SPECTOR')
dooodle.RankLabel.Text = ('//: SPECTOR')
Here’s the path:
(I deleted unrelevant things)