I made this script to countdown when it gets put in workspace, but the text in the TextLabel stays as the default text and does not change?
Code:
local coin = script.Parent
local text = coin.BillboardGui.TextLabel
coin.AncestryChanged:Connect(function()
if game.Workspace:FindFirstChild(coin) then
for i = 1, 60 do wait(1)
text.Text = string(60 - i)
end
coin:Destroy()
end
end)
The issue is most likely in your conditional. FindFirstChild() does not work by finding instances, but by finding names. If the coin is called “coin” and you did workspace:FindFirstChild("coin") then it would work. However, I’m assuming you need to determine if that specific coin is in the workspace, so instead you could use the second parameter of AncestryChanged to determine what the new parent of the coin is.