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

Click detector issues?[Solved]

I know I'm way off with this script. Please Help :D Edited once: the click detector will insert, but wont work.

tom = false

while true do
	wait() --added
	Click = Instance.new("ClickDetector")
	if script.Parent.Parent.Humanoid.Health <= 0 then
	tom = true
	Click.Parent = script.Parent
	end
end

function click(guy)
	if tom == true and script.Parent.Parent.Player.ToolTip == guy then
	script.Parent.Parent:Remove()
	end
end

script.Parent.Clicked:connect(click)

Solved

The function and while true do needed separate scripts. Activated by outside occurrences.

ANY Help is appreciated. Thanks :D

3 comments

0

Is there anything in the Output?

0

while true do without a wait will crash your game. You are also creating a LOT of click detectors.

0

it only creates two, and I fixed the whole thing, but thanks for the input :D

1 answer

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