Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I make a script do 2 things at once?

I am trying to make a button Say "I've been clicked!" and Reset or kill the player. But I don't know what is wrong, I have asked numerous questions just to do this one thing.

My Code is here:

local player = game.Players.LocalPlayer
local screenGui = Instance.new("ScreenGui")
screenGui.Parent = script.Parent
local textButton = Instance.new("TextButton")
textButton.Parent = screenGui
textButton.Position = UDim2.new(0, 25, 0, 50)
textButton.Size = UDim2.new(0, 150, 0, 50)
textButton.BackgroundColor3 = BrickColor.White().Color
textButton.Text = "Click Me To Reset!"
textButton.MouseButton1Down:connect(function()
textButton.Text = "I've been clicked!"
player.Character.Humanoid.health = 0
end)

1 comment

0

The 'Health' property should be capitalized.

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.