So I've gotten a free script that only works with usernames however, I'm trying to change it to detect the userId. Please help, thank you! local seat = script.Parent
seat.ChildAdded:connect(function( newChild )
if newChild:IsA("Weld") then
if newChild.Part1.Name == "HumanoidRootPart" then
local player = game.Players:GetPlayerFromCharacter(newChild.Part1.Parent)
if (player) then
if player.UserId == script.Parent.Parent.Name then
--code here or leave blank
else
newChild.Part1.Parent.Humanoid.Health = 0 -- kills player
end
end
end
end
end)
The folder the seat is in is named after the player's userid, there's two parents.

1 comment
free script? what? the? heck?