How to edit player module?

Hi, I need to make some changes to player module, is it possible, if yes, how? I tried this, but it isnt working

game.Players.PlayerAdded:Connect(function (plr) 
for _,camScript in pairs(game.ServerStorage["script templates"].CustomPlayerModule.Camera:getChildren()) do

Just fork the PlayerModule?

As for your code not working, this is why you apply basic debugging or read documentation before posting threads. PlayerScripts cannot be accessed by the server.

1 Like

Oh ok, I was confused, bec when i start writing, the autocorrect will give me it as option even on server.

I tried this

local plr = game.Players.LocalPlayer 
for _,camScript in pairs(game.ReplicatedStorage["script templates"].CustomPlayerModule.Camera:getChildren()) do
	camScript:Clone().Parent = plr.PlayerScripts.PlayerModule.CameraModule

but it doesnt work

Again… just fork the PlayerModule and replace the modules from there. There’s no reason to code this in. The module aren’t automatically reloaded when you replace them either. Everything is required once.

Where even are you running this script from?

1 Like

It doesn’t feel like you have any experience in programming. Printing “edited” won’t edit it. What you should do is go inside the game and in players locate what you want, copy paste it somewhere afterwards. Make changes to that module and when you are done place it in Replicated/Server Storage.

And now with a script write something like this

local RS = game:GetService("ReplicatedStorage")
	local betterCam = RS:WaitForChild("whateverYouHaveHere")
	betterCam.Parent = findOutTheLocationYourself

REMEMBER I CAN’T EMPHASISE THIS ENOUGH! You can’t just print “edited” for it to be edited. You need to make actual changes to the script you have now placed (somewhere) if you have followed my instructions.

it was just feedback for myself

You can’t make any changes remotely from another script. YOU made NOTHING to iterate the code you wanted and called it a day with “print(“edited”)”

I have told you this. If you want to have a custom module. Replace the module with something you have edited through the script editor. Your question was “HOW TO EDIT PLAYER MODULE” not how to replace them. It is as simple as going inside them… And IF FOR SOME REASON, you did word it wrong. Then I suggest you change the title to “How to replace player modules with custom ones”

look on my script there is this (exactly what you are saying)

Ok, tell me how to edit them without replacing.

. Did you read what I said?

You can’t make any changes remotely from another script.

Ya, and i knew it before, but if replacing the player module is only way how to edit it, why the topic title is bad

… I don’t know if you are serious or not but the title is misleading. Look up the definition of ‘editing’ please and change your title. Secondly make this topic solved because you have already gotten all the necessary information.

idk who is buged, but for me, it solved

What do you mean by “fork” the PlayerModule?

Sorry I’m new

Means taking your own copy to modify.