Im trying to make a game with team’s that have specific ranks (EXP), i tried having a basic script displaying player’s EXP and needed EXP to rank up. I used an module script to put all my teams and ranks inside.
Currently im only trying to print Needed exp but it’s not working!
Script inside StarterGui:
local player = script.Parent.Parent.Parent.Parent
local Roles = require(game.ServerStorage.Modules.Roles)
warn(Roles[player.Team.Name][player:WaitForChild("TeamData"):WaitForChild("Role").Value])
Module inside ServerStorage > Modules:
local module = {}
local Roles = {
["Security Department"] = {
["Recruit"] = 100,
}
}
return module
I don’t know what you mean exactly but i wrote it my self without any help, this was my first time trying to use module scripts for this so i don’t know how this can be done, i just tried to do it this way since it seems better and is easier to customize but i can’t seem to make it work.
local Team = game:GetService("Teams")["TeamNameHere"]
function GetTeam(player)
if not player then
return false
end
print(player.Team)
end
return GetTeam