#this is for serverside not local but its for a Upgrade System that im doing instead of StarterGui

3 messages · Page 1 of 1 (latest)

hazy mason
#
local Upgrader = workspace.UpGraderWall.Part.SurfaceGui
local Up1 = Upgrader.Upgrade1
local Cost = script.Cost
function Upgrader1(player)
    local leaderstats = player:FindFirstChild('leaderstats')
    if leaderstats ~= nil then
        local NewValue = leaderstats.Cash
        if NewValue.Value >= Cost.Value then
            Cash.Value *= 1.5
        end
    end
    print('Upgraded')
end
Up1.MouseButton1Click:Connect(Upgrader1)``` this is in ServerScriptService
#

since i dont want to use RemoteEvents

#

and this is what it says