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

How do I get the LocalPlayer when FilteringEnabled is on?

Asked by
Jexpler 63
6 years ago

I'm using a regular script, not a local script. How do I get the LocalPlayer? Obviously I can't use

game.Players.LocalPlayer

because when FilteringEnabled is on, LocalPlayer returns nil.

0
How'd that make sense in a server script? hiimgoodpack 2009 — 6y
0
You might want to read this, might help a bit: http://wiki.roblox.com/index.php?title=Experimental_Mode SuperAndresZ_YT 202 — 6y
0
How does that not make sense? I want to make changes to the entire server, but get a players rank in a group and stuff like that. Jexpler 63 — 6y

1 answer

Log in to vote
3
Answered by
Simnico99 206 Moderation Voter
6 years ago
Edited 6 years ago

Hi Jexpler you can't get a localplayer from a regular script in FE because it isolate the player and the server you need to either use a remote event or remote function there is some exeptions tho... but as an exemple

ClientSide

local remoteFunction = game.Workspace.RemoteFunction

remoteFunction:InvokeServer("Test")

ServerSide

local remoteFunction = game.Workspace.RemoteFunction

function remoteFunction.OnServerInvoke(Player, String)
     print(Player, String)
end
0
I used the serverside one and nothing happened. Jexpler 63 — 6y
0
You need the 2 Simnico99 206 — 6y
Ad

Answer this question