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

Anti-Tool Script Help?

The tool called 'tool' even if it isn't equipped and I sit down on the seat, i still die. I need it to only kill when the tool is equipped. Help please? No output btw.

local seat = script.Parent function onChildAdded(child) local user = child.part1.Parent if (child.Name == "SeatWeld") or user:FindFirstChild(Tool).Equipped then user.Head:remove() end end script.Parent.ChildAdded:connect(onChildAdded)

1 answer

Well, you look for something named "part1" inside of the seatweld that enters the seat, but it the property is actually named "Part1". Also, you are just finding the parent of a Property, which returns a nil value.

I'm not sure if this will work, but try replacing your user variable with this: local user = game.Players[child.Part1.Value].Character

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