Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How to call LoadPlayer locally? (FilteringEnabled)

Asked by 8 years ago

I'm making a 'Mystery Mine' game (FilteringEnabled is on of course) and I'm having trouble loading the character. I can't load the character through a LocalScript, I'm not allowed to. I thought of activating a serverscript and then remembered serverscripts can't be in the local player AND LocalScripts can't activate them if they are in workspace because of the inability to load them. I honestly don't know where to go anymore, so I went here. I hope you'll help soon!

chem

0
You can run the LocalScript in a local Environment, such as inside the Player for example.  There should be no need to have a LocalScript in the workspace, as they should be used to change or call things on the client end, therefore needing to be in a local Environment. BlackJPI 2658 — 8y
0
Perhaps I didn't word correctly. The localscript is in a local environment (PlayerGui) and I need to find some way to call LoadCharacter with that LocalScript. ChemicalHex 979 — 8y
0
Use remote events. Vezious 310 — 8y
0
Can you maybe answer regarding how to do this exactly? ChemicalHex 979 — 8y

1 answer

Log in to vote
2
Answered by 8 years ago

How to use RemoteEvents.... I can answer it for you... Alright to use Remote Events you can use a OnClientEvent or a OnServerEvent....

OnClientEvent Fires listening functions in LocalScripts when either FireClient or FireAllClients is called from a Script... So basically you can fire functions in a LocalScript when a :FireClient(player) or :FireAllClients(player) function is called from a ServerScript to that particular RemoteEvent. Make sure you use the Player that the event is getting fired on as an argument oh in a LocalScript you can just call a variable for Player.... something like.... player = game.Players.LocalPlayer

OnServerEvent Fires listening functions in Scripts when FireServer is called from a LocalScript. So this is basically the other way around you can fire functions in a ServerScript from a LocalScript. In here you could use Player as an argument if you do a PlayerAdded event in the ServerScriptService.... Or whatever function you are using.

Sorry for making it so long and I am so sorry if I over-complicated things if you still have trouble after this session I am sure the Roblox Wiki can explain it better and if you don't want the Wiki to explain it just contact me on Roblox.... My name on Roblox is "KingLoneCat" although that should be plainly obvious I just wanted to point it out to you....

0
Is there any way to call FireServer with some variables? E.g, player name, something in leaderstats.... ChemicalHex 979 — 8y
0
Well what are you trying to do in leaderstats? Most likely with FireServer you would use arguments but, variables could be used as well.... KingLoneCat 2642 — 8y
Ad

Answer this question