Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Click detector issues?[Solved]

Asked by 9 years ago

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

0
Is there anything in the Output? minikitkat 687 — 9y
0
while true do without a wait will crash your game. You are also creating a LOT of click detectors. YellowoTide 1992 — 9y
0
it only creates two, and I fixed the whole thing, but thanks for the input :D BSIncorporated 640 — 9y

1 answer

Log in to vote
1
Answered by 9 years ago

ahubbabuba

Ad

Answer this question