#Gui script problem

15 messages · Page 1 of 1 (latest)

lavish scroll
#

attempt to index nil with 'Config' means that somewhere you do something.Config while that something is nil.

#

I think you should add print(selectedTower) above of this code

#

it probably will print nil

rigid crystal
#

k ima try

lavish scroll
#

which line causes the error

rigid crystal
#

the gui.Select.Total.TotalDamage.Text = "Total Damage: " .. selectedTower.Config.TotalDamage.Value

lavish scroll
#

the one outside of event hadler, right?

#

I mean outside of Connect thing

rigid crystal
#

its inside that connect(function) tho

lavish scroll
#

.Changed event passes new value to the functions connected to it

#

you can do

selectedTower.Config:FindFirstChild("TotalDamage").Changed:Connect(function(NewValue)
    gui.Select.Total.TotalDamage.Text = "Total Damage: " .. NewValue
end)
rigid crystal
#

k ima try

barren inletBOT
#

studio** You are now Level 5! **studio

rigid crystal
#

yoooo it works

#

Tysm dude :)