Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How can I make a server script access a player's PlayerScripts?

I have a local script in the StarterPlayerScripts that contains int values. I want to modify these int values from a server script and when I tested, modifying them only worked in a local test not online. So how do I get a server script to get to a player's PlayerScripts folder?

i.e

  • local script has int values of things like 'speed' and 'top speed'
  • player touches a part in game to boost speed
  • script looks for the values in the player's playerscripts
  • value is there in local test but not there in online test
  • script doesn't work online

5 comments

1

you can't, put the LocalScript somewhere else

0

What if I move the int values somewhere the server can access them but make so that they are only for the player playing? What place would be appropriate?

1

the player would be good

1

Like, the player object

1

Use RemoteEvents/RemoteFunctions to achieve this

1 answer

Don't

If you need to move something to PlayerScripts, a good idea might be to stick it in StarterPlayerScripts and then make the script run in the mean-time by cloning it into the PlayerGui. It's not conventional, but neither is what you're trying to do.

This discussion is preserved as it was. New answers, comments, and votes are closed.