There is a Workspace.Part.Script:5: attempt to index local 'player' (a nil value)
poping up in the output - can anyone explain it so i can understand - goku
local part = script.Parent part.Touched:Connect(function(hit) local player = game.Players:GetPlayerFromCharacter(hit.Parent) if player:IsInGroup(2793019) then print("eeeeeeeeeeeeeeeee") end end)
You are not checking if what Touched is even Part of a Character. To do so check if hit.Parent has a HumanoidRootPart
.
Try this;
local part = script.Parent part.Touched:Connect(function(hit) local player = game.Players:GetPlayerFromCharacter(hit.Parent or hit.Parent.Parent) if player and player:IsInGroup(2793019) then print("eeeeeeeeeeeeeeeee") end end)
I believe it's because the part is touching an accessory or some other child of a part within the Character player model. If that's hard to understand let me know, I'm not good at explaining.