That may have been hard to understand, let me try to make it clearer. I need (really want) it where when a player clicks a block (using ClickDetector?), a frame shows for 10 seconds. Now that I think about it, I think I got it clear enough in the title. Oh well. This is what I've got so far (please understand I'm terrible at scripting so this may be completely wrong..)
function onClicked (mouse) script.Parent.Parent.Parent.Parent.StarterGui.ScreenGui1.Frame1.Visible = true wait (10) script.Parent.Parent.Parent.Parent.StarterGui.ScreenGui1.Frame1.Visible = false end script.Parent.ClickDetector.MouseClick:cÂonnect(onClicked)
Try this.
script.Parent.ClickDetector.MouseClick:connect(function(p) repeat wait(1/30) until p.PlayerGui and p.Character p.Character.Humanoid:TakeDamage(50) p.PlayerGui.ScreenGui1.Frame1.Visible = true wait(10) p.PlayerGui.ScreenGui1.Frame1.Visible = false end)
In TakeDamage(50)
, change 50 to however much damage you want the player to take.