achdef
(blue)
March 13, 2021, 12:28pm
#1
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
NWhut
(whut)
March 13, 2021, 12:31pm
#2
Player is the LocalPlayer, not the game’s Players service
NWhut
(whut)
March 13, 2021, 12:32pm
#3
And you can only use require on ModuleScripts, not normal scripts
achdef
(blue)
March 13, 2021, 12:32pm
#4
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
achdef
(blue)
March 13, 2021, 12:35pm
#6
I do not see what is the issue with a screenshot and the basic LUA Tool?
1 Like
NWhut
(whut)
March 13, 2021, 12:35pm
#7
Can you send whats in the mainscript?
A localscript can not see what’s inside a ServerScriptService.
3 Likes
achdef
(blue)
March 13, 2021, 12:37pm
#9
OH. That seems logic. Rip me being a bad scripter. Let me change it.
achdef
(blue)
March 13, 2021, 12:40pm
#10
NWhut
(whut)
March 13, 2021, 12:41pm
#11
The localscript cant access serverscriptservice, try putting it in ReplicatedStorage instead
achdef
(blue)
March 13, 2021, 12:42pm
#12
I just changed it, let me go back in test mode and see. I will never be a pro of lua anyways.
NWhut
(whut)
March 13, 2021, 12:43pm
#13
And one more thing: Module scripts can only return exactly one value, in your screenshot you returned setup, main
achdef
(blue)
March 13, 2021, 12:43pm
#14
So how would I return both of them without getting a error?
NWhut
(whut)
March 13, 2021, 12:44pm
#15
game.PlayerAdded should be connected in a separate server script
NWhut
(whut)
March 13, 2021, 12:45pm
#16
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
achdef
(blue)
March 13, 2021, 12:48pm
#17
Sure I guess. You could just add me and I put you in team create tho.
NWhut
(whut)
March 13, 2021, 12:48pm
#18
Sure thing, accept my friend request
achdef
(blue)
March 13, 2021, 12:49pm
#19
For sure! Give me a second, my phone is more fast let me use it.
NWhut
(whut)
March 13, 2021, 12:49pm
#20
I’m on my phone right now, ill be able to get on my PC in a few minutes, thanks for waiting a bit