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

i making a simulator and my script to sell stuff and earn cash wont work?

Asked by 3 years ago
Edited 3 years ago
local part = script.Parent
part.Touched:Connect(function(hit)
    local h = hit.Parent:FindFirstChild("Humanoid")
    if h then
        local player = game.Players:GetPlayerFromCharacter(hit.Parent)
    if player then
        local leaderstats = player:WaitForChild("leaderstats")
        local money = leaderstats.Gold
        local selling = leaderstats.Sips
            if selling.Value >= 0  then
                money.Value = money.Value + selling.Value*1
                selling.Value = 0
            end
    end
    end
end)
0
Is this a server or client script? Are you receiving any errors in the Output window? If so, please post them. COUNTYL1MITS 312 — 3y
0
server kidsteve923 139 — 3y
0
and i dont recieve any error kidsteve923 139 — 3y

Answer this question