I am trying to make a script that when a character opens a door, it opens for the entire server. So i made it go through a server event, with the doorName value as the name of the door. but whenever I run this script:
local function openDoor(player, doorName)
doorName.Humanoid:Destroy()
end
the output says that "Humanoid" is a nul value, when there definitely a humanoid in the model.
doorName is set to the value of a string value with the location of the door model, I don't know if that has anything to do with it or not.

2 comments
Is doorName a reference to a model, or a model's name?
doorName is a referance to the model of a door