Its Supposed to be for a Murder Mystery Type game, Except made from Screen Guis on Invisible parts, It is not working for some reason though, No errors, Just doesnt work, Any reason why?
Script
Names = {"Sarah","Paul","Michael","Heather","Kevin","India"} Colors = {"Really red","Really blue","Really black","Earth green","Cyan","Pink"} for i,v in pairs(game.Players:GetChildren()) do b = Instance.new("Part", v.Character.Head) g = Instance.new("SurfaceGui", v.Character.Head.b) t = Instance.new("TextLabel", v.Character.Head.b.g) b.Size = Vector3.new(3.8, 2.6, 0.8) b.Position = Vector3.new(44.4, 7.54, -43.25) b.CanCollide = false b.Transparency = 1 t.BackgroundTransparency = 1 t.Size = Vector3.new{"0,800"},{"0,600"} t.Font = "Legacy" t.FontSize = "Size48" t.Color = Colors[math.random(#Colors)] t.Text = Names[math.random(#Names)] if v.Character.Humanoid.Health == 0 then v.Character.Head.b.g.t.Text = Names[math.random(#Names)] end
You forgot an end! Edit : (Multiple errors)
Try this ;
names = {"Sarah","Paul","Michael","Heather","Kevin","India"} for i,v in pairs(game.Players:GetChildren()) do if workspace:FindFirstChild(v.Name) then c = BrickColor.Random() local b = Instance.new("BillboardGui",v.Character.Head) b.Size = UDim2.new(6,0,2,0) b.StudsOffset = Vector3.new(0,1.5,0) local text = Instance.new("TextLabel",b) text.Size = UDim2.new(1,0,1,0) text.Text = names[math.random(1,#names)] text.TextColor3 = c.Color text.TextScaled = true text.BackgroundTransparency = 1 end end