Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to make this increase a GUI number?

In my game, I am trying to make an advanced Scoring system. Whenever your score goes up, a number on the screen will go up as well. I was wanting to know if it's possible to change GUI text.

GUI is like this in the explorer: Scores Score Frame Text

local Humanoid = script.Parent.Humanoid
function PwntX_X() 
local tag = Humanoid:findFirstChild("creator") 
	if tag ~= nil then 
		if tag.Value ~= nil then 
local Leaderstats = tag.Value:findFirstChild("leaderstats") 
			if Leaderstats ~= nil then 
Leaderstats.Score.Value = Leaderstats.Score.Value + 100
wait(0.1)
script:remove()
			end 
		end 
	end 
end 
Humanoid.Died:connect(PwntX_X) 

1 answer

local Humanoid = script.Parent.Humanoid
function PwntX_X() 
local tag = Humanoid:findFirstChild("creator") 
    if tag and tag.Value then
local Leaderstats = tag.Value:findFirstChild("leaderstats") 
            if Leaderstats then 
Leaderstats.Score.Value = Leaderstats.Score.Value + 100
workspace.Score.Scores.Frame.Text = Leaderstats.Score.Value
wait(0.1)
script:Destroy()
            end 
        end 
  
end 
Humanoid.Died:connect(PwntX_X) 

btw this script needs a lot of work

This discussion is preserved as it was. New answers, comments, and votes are closed.