I was trying to get the PlayerModule to stop the player from moving, the problem is that the PlayerScripts instance doesn’t exist in the server for some reason.
Code:
print(game:GetService("Players"):GetPlayerFromCharacter(hit.Parent):GetChildren() , game:GetService("RunService"):IsServer())
local controls = require(game:GetService("Players"):GetPlayerFromCharacter(hit.Parent).PlayerScripts.PlayerModule):GetControls()
Output:
11:24:44.686 ▼ {
[1] = StarterGear,
[2] = PlayerGui,
[3] = leaderstats,
[4] = Backpack
} true - Server - CollectionServiceActivator:24
11:24:44.698 PlayerScripts is not a valid member of Player “Players.boyparis” - Server - CollectionServiceActivator:25