local Id = 74352222 --Change 0 to the ID of the item, You do not have to wear the item e.c.t, Hats, T-Shirt, Gear, Shirts, Even Shirts.
function onTouched(hit)
player = game.Players:GetPlayerFromCharacter(hit.Parent) --Meaning Player shall Get the Player from the Humanoid and finding the humanoid that hit it and its Parent
if player.Name == "tehepicford" then --If the above statement is true then it shall proseed
if hit.ClassName ~= "Hat" or hit.Parent.Name ~= "BPart" or hit.Parent.Name ~= "GPart" then
if game:GetService("BadgeService"):UserHasBadge(player.userId, Id) then --Finding the game and getting the Badge Service checking if the user has the badge.
script.Parent.Transparency = 0.6
script.Parent.CanCollide = false
wait(4)
script.Parent.Transparency = 0
script.Parent.CanCollide = true
end
else
H = player.Name
game.Workspace:FindFirstChild(H).Humanoid.Health = 0
end
end
end
script.Parent.Touched:connect(onTouched)
Output;
21:27:51 - Workspace.ID V.I.P Door.Script:5: attempt to index global 'player' (a nil value)
21:27:51 - Script "Workspace.ID V.I.P Door.Script", Line 5
21:27:51 - stack end
|