Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do i fix my click part thing? (SOLVED)

So im trying to make a game where basically you pop balloons for cash (ik that sounds dumb). And im doing the script where you pop the balloon but it says inifinite yield possible, how do i fix it?

local clickdetector = script.Parent:WaitForChild("ClickDetector")

clickdetector.MouseClick:Connect(function(player)
	game.Workspace.Balloon:Destroy("Ball, String")
end)

1 comment

0

wait never mind i found the solution

2 answers

✓ Accepted answer

If you figured out the solution yourself, then answer the question yourself in the answers, and accept it (if you can.) Or, just put (Solved) in the title of your question.

1 comment

0

ok

local Players = game:GetService("Players")

local Balloon = script.Parent.Parent

local sound = Instance.new("Sound", game.Workspace)
sound.SoundId = "rbxassetid://2375539277"

local clickdetector = script.Parent:WaitForChild("ClickDetector")

-- >>: Click Function

clickdetector.MouseClick:Connect(function(player)
	Balloon:Destroy("Ball, String")
	sound:Play()

This discussion is preserved as it was. New answers, comments, and votes are closed.