function onTouched(hit)
	local player = game.Players:GetPlayerFromCharacter(hit.Parent)
	if player then
		local gui = player.PlayerGui.PointsGui.PointsFrame.Points
		local points = tonumber(gui.Text)
		if points == nil then points = 0
			points = points + 1
			gui.Text = points
		end
	end
end

script.Parent.Touched:connect(onTouched)

The text will change to 1, like it says in the script, but it wont go any higher, can anyone help me with this? Thanks a million! :)

2 comments

0

Move the end on line 9 to the end of line 6. Quick question, why move the end in the first place?

0

Didnt realize I did, my mistake!