Ad
Log in to vote
0

My Workspace.Part.Transparency ==0 Cash Script Isn't Working, Would You Please Help Me?

Asked by 3 days ago

I recently posted a similar script about a day ago and someone helped, but this script isn't working either and I can figure it out. I've experimented with it and can't figure it out. Please help, thank!

game.Players.PlayerAdded:Connect(function(player)
    local stats = Instance.new("Folder")
    stats.Name = 'leaderstats'
    stats.Parent = player
    local cash = Instance.new("IntValue")
    cash.Name = 'Cash'
    cash.Parent = stats
    local part = workspace.B
    while part.Transparency == 0 do
        wait(2)
        cash.Value = cash.Value + 25
    end
end)
1
How exactaly it don't works? Leamir 1139 — 3d
0
Try this one my dude print("Cash Leaderboard Loaded") function onPlayerEntered(newPlayer) local stats = Instance.new("IntValue") stats.Name = "leaderstats" -- Do not change this local cash = Instance.new("IntValue") cash.Name = "Cash" -- Name of Currency. cash.Value = 1000 -- Amount each player who enters, get. cash.Parent = stats stats.Parent = newPlayer end game.Players.ChildAdded xOmqZaxk -45 — 3d

1 answer

Log in to vote
0
Answered by 3 days ago

Hey, I noticed a fairly simple issue with your script. When you're defining the local part, you must have an exact location, not just a simplified version. I redid the script and made a working version of the game here, with copying on. Or you can view the script as:

game.Players.PlayerAdded:Connect(function(player)
    local stats = Instance.new('Folder')
    stats.Name = 'leaderstats'
    stats.Parent = player
    local cash = Instance.new('IntValue')
    cash.Name = 'Cash'
    cash.Parent = stats
    local part = game.Workspace.B 
    while part.Transparency == 0 do
        wait(2)
        cash.Value = cash.Value + 25
    end
end)
0
You put local part = workspace.B, You must have it as local part = game.Workspace.B superawesome113 10 — 3d
Ad

Answer this question