I have a script in StaterCharacterScripts it performs a function when I press a key, I will not go into that too much, as you may know it will stop working immediately after the player dies and respawn, so because of that I need to know the alternative places that I can place this local script
1 Like
https://developer.roblox.com/en-us/api-reference/class/ReplicatedFirst
Another way you could do it is by using ModuleScripts
, which is surprisingly replicated across both sides of the client/server boundaries
put in StarterPlayerScripts? i guess since its for a key bind function
1 Like
StarterPlayerScripts, Workspace, RepFirst
but in your case try Placing it in StarterPlayer > StarterPlayerScripts
? also you can place a local script in any Player Based Folder.
like StarterGui, StarterPack, StarterPlayerScripts, ReplicatedFirst or even the player’s character.
“ A LocalScript will only run Lua code if it is a descendant of one of the following objects:
- A Player’s
Backpack
, such as a child of aTool
- A Player’s
character
model - A Player’s
PlayerGui
- A Player’s
PlayerScripts
. - The
ReplicatedFirst
service”
1 Like