i can tell it doesn’t work because when the model = nil the model.PrimaryPart
does not exist
Either way … you don’t put that line in a loop. It is basically setting up an interrupt that will fire on it’s own. The way you’re doing it now you’re creating a new interrupt with every stepped wait.
Yeah, you’re right. Look at my edit.
Should probably add that you don’t reconnect the function if you’re setting Model to nil
.
i can tell it doesn’t work because when the model = nil the model.PrimaryPart
does not exist
then all of the script doesn’t work!
The connection will be automatically disconnected when the model is destroyed.
oh i seen only now wait a minuite!
Ok Works The Part above you edited, but doesn’t solve the problem where the model can’t detect walls and ceiling but only the character
i even tried to get the model in replicated storage and then in workspace using the local script but it doesn’t work