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

can some one help me with this add points scirpt??

Asked by 5 years ago
Edited 5 years ago

ok so here is the script:

local Button = script.Parent
local Player = game:GetService("Players").LocalPlayer
local UserInput = game:GetService("UserInputService")
local canclick = true
script.Parent.MouseButton1Down:connect(function()
    if Player:FindFirstChild("Points").Value > 0 and canclick then
        Player.Strength.Value = Player.Strength.Value + 1
        Player.Points.Value = Player.Points.Value - 1
        wait(0.1)
        canclick = true
    end
end)

there is a text box that should add the amount of points but it wont do it

(Edit)

this is how it looks like in the explorer

https://gyazo.com/4fcd215265602051b846b3611583be38

and the GUI

https://gyazo.com/5804ee76798d2bac9fb83e933da92c99

0
the strengthattribute is it a textbox or text button? aazkao 787 — 5y
0
text button themandes77 -1 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

Player.Points.Changed:Connect(function(value) Player.Points.Value = value end)

Ad

Answer this question