Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Can someone troubleshoot my GUI Script?

Asked by 10 years ago

So this is output:

18:47:17.678 - TimeVal is not a valid member of Frame 18:47:17.679 - Script 'Workspace..Humanoid.Script', Line 20 18:47:17.679 - Stack End

What puzzles me, is that there is nothing called "Frame" Here is the script:

script.Parent.Parent:WaitForChild("Humanoid").Died:connect(function(bob)
            for k, p in pairs(game.Players:GetPlayers()) do
                local t=p.PlayerGui.TargetGui.Targets
                local f=script.Parent.Parent.head.face.Texture
                local gui=p.PlayerGui

                if t.Target1.Image~=f then
                    gui.TimeGui.Timer.TextLabel.TimeVal.Value=gui.TimeGui.Timer.TimeVal.Value-20
                    elseif  t.Target2.Image~=f then
                    gui.TimeGui.Timer.TextLabel.TimeVal.Value=gui.TimeGui.Timer.TimeVal.Value-20
                    elseif t.Target3.Image~=f then
                    gui.TimeGui.Timer.TextLabel.TimeVal.Value=gui.TimeGui.Timer.TimeVal.Value-20
                    elseif t.Target4.Image~=f then
                    gui.TimeGui.Timer.TextLabel.TimeVal.Value=gui.TimeGui.Timer.TimeVal.Value-20
                    elseif t.Target5.Image~=f then
                    gui.TimeGui.Timer.TextLabel.TimeVal.Value=gui.TimeGui.Timer.TimeVal.Value-20
                    elseif t.Target6.Image~=f then
                    gui.TimeGui.Timer.TextLabel.TimeVal.Value=gui.TimeGui.Timer.TimeVal.Value-20


                end
            end
        end)
0
I can help, while typing on a phone q.q HexC3D 830 — 10y

1 answer

Log in to vote
0
Answered by 10 years ago

Nevermind, I figured out that i forgot to put .TextLabel in the second part of the elseif

Ad

Answer this question