Help with a kill script

Hi,

Im making a kill script. Sop if this frame is visible it will kill the person who’s seeing it. Like it will just kill that person who sees it. Does that make sense? Well I made the first part but I’m missing a small chunk in the middle.

if script.Parnet.Visible == true then

end

I hope you can help me!

From,
File

If this is a LocalScript then you’d do this:

local player = game.Players.LocalPlayer

script.Parent:GetPropertyChangedSignal('Visible'):Connect(function()
local visible = script.Parent.Visible

if visible then
player.Character.Humanoid.Health = 0
end
end)
1 Like

it doesn’t seem to work. There may be an issue with my if statment.

it works! Thanks a lot! Now I can get back to building :slight_smile: