So this is in a modulescript:
so what im trying to do is im trying to set “player” parameter for the function which is from another event from server side script:
normally you do it like: Zone1.playerEntered:Connect(function(player) end) but since im trying to get function from module i can’t do it this way and my problem is that when modulescript runs code once the “player” parameter equals to nil so it returns error.
im not doing .playerEntered in modulescript cuz it works with issues. thanks to anyone that can give some tips.
You have to either remove the calling brackets at the end: Zone1.playerEntered:Connect(DuelModule.Plr1_Enter)
Or you can just wrap it in a function: Zone1.playerEntered:Connect(function(player) DuelModule.Plr1_Enter(player) end)
Thanks that works now but i was wrong about it having issues if i do it in modulescript cuz it still has issues but that has nothing to do with this so i’ll mark this as solution.