#I can't figure out to get rid of the Infinite Yield problem

1 messages · Page 1 of 1 (latest)

primal pulsar
#
local Character = Player.Character
local Humanoid = Character:WaitForChild("Humanoid")
local GloveStatsNum = Player.GloveStatsDetect
local GloveV = GloveStatsNum.Value
local Detect = Humanoid.Parent:WaitForChild("inmap")
local tool = Humanoid.Parent:FindFirstChildWhichIsA("Tool")
local toolG = tool:FindFirstChild("Information").Power


local GloveDetect 

local textIndicator = script.Parent




local function UpdatePower()
    textIndicator.Text = "Power: "..math.round(toolG.Value)
        return
    
end

UpdatePower()



toolG:GetPropertyChangedSignal("Value"):Connect(UpdatePower)```
#

the Detect and toolG is the one that is causing the Infinite Yield, the script does work but I just do not like seeing the infinite yield in my Output

dense moth
#

if infyield appear means it doesnt exist yet when u calling it

primal pulsar
dense moth
#

also do local Character = Player.Character or Player.CharacterAdded:Wait()

clever panther
#

your game is probably starting to soon

#

so do waht rinn said

#

and do lua local Character = Player.Character or Player.CharacterAdded:Wait()

primal pulsar
primal pulsar
primal pulsar
#

"local Detect" line

#

basically, I want the UpdatePower() to resume once it finds "inmap" through a character's children

clever panther
#

well nmap isnt being put into the player

#

or the script is being ran before inmap is put into the player

#

i would recomend a remote event

#

to fire the script

neat coral
#

is this solved @primal pulsar