Basically, I’m trying to make my progression bar go up progressively, but it’s not really working out?
task.wait(5)
-- \\ Player-Related Variables // --
local Player = game.Players.LocalPlayer
local Stuff = Player:WaitForChild("YourInnerSelf")
local QI = Stuff:FindFirstChild("QiEXP")
local QiReq = Stuff:FindFirstChild("QiNeeded")
-- \\ GUI-Related Variables // --
local ProBar = script.Parent.ProgressionBar.ActualMovingBar
local QiCHANGER = QI.Value/100
-- \\ Functions // --
QI.Changed:Connect(function()
ProBar:TweenSize(UDim2.new(QiCHANGER,0,0.654,0),"Out","Quint",0.25)
end)-- This is a local script!
local leaderstats = Instance.new("Folder", Player)
leaderstats.Name = "YourInnerSelf"
local Neigong = Instance.new("Folder", leaderstats)
Neigong.Name = "Neigong"
local Strength = Instance.new("IntValue", Neigong)
Strength.Name = "Strength"
Strength.Value = 1
QiGong = Instance.new("Folder", leaderstats)
QiGong.Name = "Qigong"
local Qi = Instance.new("IntValue", QiGong)
Qi.Name = "Qi"
Qi.Value = 1
QiEXP = Instance.new("IntValue", QiGong)
QiEXP.Name = "QiEXP"
QiEXP.Value = 0
local QiNeeded = Instance.new("IntValue", QiGong)
QiNeeded.Name = "QiNeeded"
QiNeeded.Value = Qi.Value * 10
SkillPoints = Instance.new("IntValue", leaderstats)
SkillPoints.Name = "SP"
SkillPoints.Value = 0
local data
local success, err = pcall(function()
data = Murim:GetAsync(Player.UserId)
end)
if success and data then
Neigong.Value = data[1]
QiGong.Value = data[2]
else
print("The Player has no data!")
end
end)
--This is a Server-Script!
Your server script is good, it’s just that you’re using FindFirstChild in your local script which immediately checks if there is that child and returns nil if it can’t find it. You should instead use WaitForChild, which waits until the child loads in.
Local Script:
--//Services
local Players = game:GetService("Players")
--//Variables
local LocalPlayer = Players.LocalPlayer
local YourInnerSelf = LocalPlayer:WaitForChild("YourInnerSelf")
local QI = YourInnerSelf:WaitForChild("QiEXP")
local QiReq = YourInnerSelf:WaitForChild("QiNeeded")
local ProgressBar = script.Parent.ProgressionBar.ActualMovingBar
--//Controls
local QiCHANGER = QI.Value/100
--//Functions
QI:GetPropertyChangedSignal("Value"):Connect(function()
ProgressBar:TweenSize(UDim2.new(QiCHANGER, 0, 0.654, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quint, 0.25)
end)
Add timeout in :WaitForChild because infinite yield possible means it’s taking too long it stopped waiting. So if you use a timeout after that timeout it will stopped waiting.
Like:
:WaitForChild("Instance",60)
The second parameter is the timeout.
As you can see i out 60, meaning after 60s it will stopped waiting for the object.
That’s kind of reversed because server are the one that can’t see the client’s perspective. But the client can see the server perspective. (But not the changes on the module as i tried that before)
Hard to understand what you’re trying to convey but the warning is occurring from a local script which means that for the particular client of which the local script is executing for, an instance named “YourInnerSelf” doesn’t exist.