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

How do I get the LocalPlayer when FilteringEnabled is on?

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.

3 comments

0

How'd that make sense in a server script?

0

You might want to read this, might help a bit: http://wiki.roblox.com/index.php?title=Experimental_Mode

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.

1 answer

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

2 comments

0

I used the serverside one and nothing happened.

0

You need the 2

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