Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- this script will create parts with an gui containing all childrens name
- -- see more of my scripts in https://pastebin.com/u/RandomBlox47/1/zzkM755Y
- local children = workspace:GetChildren() -- local of all childrens in workspace, you can change the workspace to anything else
- local player = game.Players.EmeraldsOfChaos.Character.Head -- local of the player's head, you can change EmeraldsOfChaos to anything else
- for i = 1, #children do -- loops through all parts on the workspace
- local part = Instance.new("Part", workspace) -- creates a new part in workspace
- local gui = Instance.new("SurfaceGui", part) -- creates a surface gui on the part
- gui.Face = "Top" -- sets the surfacegui face to "Top"
- local text = Instance.new("TextLabel", gui) -- creates a textlabel on the gui
- text.Size = UDim2.new(1, 0, 1, 0) -- sets the text size to become full
- text.Text = children[i].Name -- sets the text to the children's name
- text.TextScaled = true -- makes the text scaled
- part.CFrame = CFrame.new(player.Position.X, player.Position.Y, player.Position.Z) -- puts the part position into the players head
- end -- ends the loop
Advertisement
Add Comment
Please, Sign In to add comment