Here is the script:
script.Parent.Touched:Connect(function(hit)
if script.Parent.CanCollide then
if hit.Parent:FindFirstChild("Humanoid") then
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
local plrName = plr.Name
Here is the error: 04:08:16.707 - Workspace.Tycoons.BlueTycoon.Essentials.TycoonStarterDoor.TycoonDoor.TycoonDoorScript:112: attempt to index local 'plr' (a nil value)

4 comments
The error is on line 6
I was kicking the player before the script had time to load.
Well that is why then.
thx for your efforts though