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

How to make brick give more than one point?

Asked by 8 years ago
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! :)

0
Move the end on line 9 to the end of line 6. Quick question, why move the end in the first place? M39a9am3R 3210 — 8y
0
Didnt realize I did, my mistake! Squidier 40 — 8y

Answer this question