The Variables would print
but the objects wont appear and change the players name
local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:wait()
local backpack = plr.Backpack
local light = game.Lighting
local deb = false
script.Parent.FocusLost:connect(function(a)
if deb then return end
deb = true
print ' deb is true'
if a then
local nt = char:GetChildren()--Finds if theres one already existing
for a, ta in pairs(char:GetChildren()) do
if ta:findFirstChild('Name') then
ta:Destroy()
char.Head.Transparency = 0
print 'found a model'
end
end
end
local ta = Instance.new("Model", char)
ta.Name = script.Parent.Text.. " : " ..plr.Name
local ch = char.Head:Clone()
ch.Parent = ta
print 'made a new model and heal'
local human = Instance.new("Humanoid", ta)
human.Name = "Name"
print 'new humanoid'
local w = Instance.new("Weld", ch)
w.Part0 = ch
w.Part1 = char.Head
char.Head.Transparency = 1
print 'new weld'
wait(5)
deb = false
print ' done'
end)

1 comment
Thx u were the only one to answer me all day