You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve?
I want to make this script print Foundation Estabilishment when conditions are fullfiled -
What is the issue?
Script wont print Foundation Estabilishment Even though All conditions are fullfiled -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Everytihng, and I couldnt find any solution
local BreakthroughEvent = game.ReplicatedStorage.Breakthrough
function Breakthrough(player)
local ServerSS = game:GetService("ServerScriptService")
local dataManager = require(ServerSS:WaitForChild("Modules"):WaitForChild("DataManager"))
local profile = dataManager.Profiles[player]
if not profile then return end
local RealmsTable = profile.Data.Realms
local RealmDict = {}
for index, realm in pairs(RealmsTable) do
realm.Index = index
RealmDict[realm.Name] = realm
end
local RealmsLeaderstats = game.ServerScriptService.Modules.DataManager:WaitForChild("leaderboard")
local Qi = profile.Data.Qi
local MortalRealm = RealmDict.Mortal
local BodyTempering = RealmDict.BodyTempering
local FoundationEstabilishment = RealmDict.FoundationEstabilishment
if Qi >= BodyTempering.ReqQi and Qi <= BodyTempering.MaxQi and MortalRealm == RealmsTable[1] then
local BodyTemperingRealm = RealmsTable[2]
print(BodyTemperingRealm.Name)
if Qi >= FoundationEstabilishment.ReqQi and BodyTemperingRealm == RealmsTable[2] then
local FoundationEstabilishmentRealm = RealmsTable[3]
print(FoundationEstabilishmentRealm.Name)
end
end
end
BreakthroughEvent.OnServerEvent:Connect(function(player)
Breakthrough(player)
end)
If necessarry I can provide other Scripts
P.S I am totally new to scripting, so I apologize for any mistakes that are obvious