function effects() local l = Instance.new("TextLabel") l.Name = "msg1" l.Parent = game.Players.PlayerGui l.Position = UDim2.new(0.288834959, 0, 0.45161289, 0) l.Text = "Hello" l.TextColor3 = Color3.new(1, 0, 0) l.BackgroundTransparency = 1 l.TextSize = 31 wait(3) local at = l at:Destroy() end script.Parent.Touched:connect(effects)
You should put everything in ScreenGui, otherwise it will not appear on screen
function effects() local ScreenGui = Instance.new("ScreenGui", game.Players.PlayerGui) local l = Instance.new("TextLabel", ScreenGui) l.Name = "msg1" l.Position = UDim2.new(0.288834959, 0, 0.45161289, 0) l.Text = "Hello" l.TextColor3 = Color3.new(1, 0, 0) l.BackgroundTransparency = 1 l.TextSize = 31 wait(3) local at = l at:Destroy() end script.Parent.Touched:connect(effects)