menu
Roblox Forum Archive
Home
User Search
Forums
Donate
search
settings
Home
User Search
Forums
Donate
launch
Go to User Dashboard
Forums
Scripters
ClickDetector will not work
chevron_left
chevron_left
chevron_left
of
1
chevron_right
chevron_right
chevron_right
ClickDetector will not work
Ignite_OneTime
Join Date: 2014-09-28
Post Count: 1283
#190031978
Monday, May 30, 2016 12:55 AM GMT
function onclick(part) local h = part.Parent:FindFirstChild("Humanoid") if h~=nil then h.Health = 0 end end script.Parent.ClickDetector.MouseClick:connect(onclick)
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
Egtix
Join Date: 2009-10-22
Post Count: 3471
#190034195
Monday, May 30, 2016 1:28 AM GMT
script.Parent.ClickDetector.MouseClick:connect(function(Player) Player.Character.Humanoid.Health = 0 end) ᵈᵃᶰᶤᵉˡ
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
2eggnog
Join Date: 2008-11-08
Post Count: 1351
#190034238
Monday, May 30, 2016 1:28 AM GMT
MouseClick passes the player as an argument, not a part.
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
chevron_left
chevron_left
chevron_left
of
1
chevron_right
chevron_right
chevron_right