Why do my text won't change?

Hey, fellow developers!
Recently I have been working on my admin panel, today I try to make it so if a admin join the text change to his actual rank. But it’s won’t work for some reason. And I can’t figure it out, so, hope somes can help me! Here is the script:

You can view the output here:

1 Like

Player is the LocalPlayer, not the game’s Players service

And you can only use require on ModuleScripts, not normal scripts

Would I have to turn my MainScript on to a module?

1 Like

Please organise your code in between three backticks ` at the start and end so it is easier to read

code

I do not see what is the issue with a screenshot and the basic LUA Tool?

1 Like

Can you send whats in the mainscript?

A localscript can not see what’s inside a ServerScriptService.

3 Likes

OH. That seems logic. Rip me being a bad scripter. Let me change it.

There you go I guess. Screenshot by Lightshot

The localscript cant access serverscriptservice, try putting it in ReplicatedStorage instead

I just changed it, let me go back in test mode and see. I will never be a pro of lua anyways.

And one more thing: Module scripts can only return exactly one value, in your screenshot you returned setup, main

So how would I return both of them without getting a error?

game.PlayerAdded should be connected in a separate server script

There’s a lot of stuff that has to be fixed here, Would you mind sending me the game file through private messages, so I can fix it for you? After I’m done you can see what I’ve changed

Sure I guess. You could just add me and I put you in team create tho.

Sure thing, accept my friend request

For sure! Give me a second, my phone is more fast let me use it.

I’m on my phone right now, ill be able to get on my PC in a few minutes, thanks for waiting a bit