Hi, I'm currently working on JAZZTRONAUTS (gmod gamemode is which pretty awesome) like-game in roblox. (most of what i'm saying you wont understand unless you know what the original game is)

when you steal a prop in the thing, the gui shows up as it changes the prop numbervalue, but i can't get it to disappear after 3 seconds without making the prop take 3 seconds to display the correct value.

this is what i had originally:

while true do
	repeat wait() until player:WaitForChild('data').propAmount.Value > 0
	script.Parent.Parent.Visible = true
	while true do
		wait()
		if player:WaitForChild('data').propAmount.Value > 1 then
			script.Parent.propAmount.Text = player.Name..' Stole '..player:WaitForChild('data').propAmount.Value..' props!'
			script.Parent.moneyGain.Text = '$'..math.floor(player:WaitForChild('data').money.Value)
		else
			script.Parent.propAmount.Text = player.Name..' Stole '..player:WaitForChild('data').propAmount.Value..' prop!'
			script.Parent.moneyGain.Text = '$'..math.floor(player:WaitForChild('data').money.Value)
		end
		local stopAmount = player:WaitForChild('data').propAmount.Value
		if stopAmount == player:WaitForChild('data').propAmount.Value then
			break
		end
	end
	player:WaitForChild('data').propAmount.Value = 0
	script.Parent.Parent.Visible = false
end

if anyone could find out how to do this correctly, it would be nice. alright, thanks.

1 comment

1

It has to all be through local and it has to be through player. You can't just say script.parent.parent.parent = false as that can cause it to break.