I am trying to add text to this GUI button that by clicking on it, it will go from "Spawn Brick" to "Spawning Brick in " .. (some number) .. " seconds". After the time is up, the part will spawn and the GUI text will go back to "Spawn Brick". However, I am not sure how to do this. The script is inside a localscript. Here's my script below:
local spawn = script.Parent -- the spawn variable is the button
local workspace = game:GetService("Workspace")
spawn.MouseButton1Down:connect(function()
local part = Instance.new("Part", workspace)
part.Name = "Test"
part.Anchored = true
part.Position = Vector3.new(5,6,5)
end
end)

1 comment
This isn't what I meant. Maybe I have confused others so I will edit my post a bit, sorry for the confusion.