So currently, I am setting Collisions with PhysicsService in ServerScriptService, but when making this, I have also tried putting this inside StarterCharacterScripts, it also works, so it got me wondering if I should be doing this in StarterCharacterScripts or in ServerScriptService, and what would be the cleanest Method for this?
This is the Current Script In Question:
local collision = require(game.ServerStorage.Components.collision) -- PhysicsService module
local user = require(game.ServerStorage.Components.user) -- StarterPlayer Module
collision.Register("Players", "Players", false) -- Creates CollisionGroup
game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
collision.setcollidable(Character, "Players") -- Sets CollisionGorup
end)
end)
This code works as intended, But after playing around with Both, They both do the Exact same thing with what I’m doing.
Inside StarterCharacterScripts:
local collision = require(game.ServerStorage.Components.collision)
collision.setcollidable(Character, "Players")
I’m not sure, but because you are requesting ModuleScripts I’m the ServerScriptService, StarterCharacterScripts as you are only requering the modules without anything more
Edit: forgot that if it’s not in the Server, it will replicate only to the Player, and Exploiters can control them