while true do
script.Parent.BrickColor = BrickColor.new(255,0,0)
--KILL PLAYER FUNCTION--
wait(math.random(3,7))
script.Parent.BrickColor = BrickColor.new(255,255,255)
wait(math.random(3,7))
end
Ive tried Disabling and Enabling a kill script(which didn't work). Ive also tried to put a function above the while true do loop that kills the player(didn't work again)
This didnt work:
function Kill(part)--probably has to do with parameter
local hum = part.Parent:FindFirstChild("Humanoid")
if hum ~= nil then
hum.Health = 0
end
end
script.Parent.Touched:Connect(Kill)
while true do
script.Parent.BrickColor = BrickColor.new(255,0,0)
Kill()
wait(math.random(3,7))
script.Parent.BrickColor = BrickColor.new(255,255,255)
wait(math.random(3,7))
end
Can anybody help with this simple question

1 comment
http://wiki.roblox.com/index.php?title=API:Class/BasePart/Touched C;