Somebody helped me get this script yesterday, and now I need it to deal 10 damage (once per time clicked) when it pops up. Try to understand? If you cant, please tell me and I'll try to explain further. Anyways, here's what I've got so far..
script.Parent.ClickDetector.MouseClick:connect(function(p) repeat wait(1/30) until p.PlayerGui p.PlayerGui.ScreenGui1.YouFoundACrab.Visible = true -- I think it should go here, but not sure what.. game.Workspace.Ouch:Play() wait(10) p.PlayerGui.ScreenGui1.YouFoundACrab.Visible = false end)
I'd appreciate it if you helped :3
You haven't told us what you are trying to deal damage to. But considering the text.. It's a crab. So I will try to make it so it works based on what you have provided me with.
script.Parent.ClickDetector.MouseClick:connect(function(p) local a = p.Character.Humanoid.Health repeat wait(1/30) until p.PlayerGui p.PlayerGui.ScreenGui1.YouFoundACrab.Visible = true a = a - 10 game.Workspace.Ouch:Play() wait(10) p.PlayerGui.ScreenGui1.YouFoundACrab.Visible = false end)
I believe this should work based on what you have provided me. In anyways... this should be located within the part of the crab. The humanoid should also be located within the model of the crab.