of     1   

rockinnoobs
#140717695Friday, July 18, 2014 6:52 AM GMT

Could someone help me make these scripts work together? By that i mean the money script/gui money work with this buying script? If you could do this it would be very helpful. Buying script: upgradecost = 0 --How much it will cost dist = 5 --____________________________________________________________ function onClicked() local p = game.Players:GetChildren() for i = 1, #p do local cash = p[i].leaderstats:findFirstChild("Points") if (p[i].Name ~= script.Owner.Value) then if cash.Value > upgradecost or cash.Value == upgradecost then if (p[i].Character.Torso.Position - script.Parent.Position).magnitude < dist then cash.Value = cash.Value - upgradecost game.Workspace.door1:remove() script.Parent.Parent:remove() end end end end end script.Parent.ClickDetector.MouseClick:connect(onClicked) Cash gui script: game.Players.PlayerAdded:connect(function(player) stat = Instance.new("IntValue") stat.Name = "leaderstats" stat.Parent = player cash = Instance.new("IntValue") cash.Name = "Cash" cash.Parent = stat end)
BLOXLUA
#140717891Friday, July 18, 2014 6:55 AM GMT

No.
EasilyUnknown
#140717987Friday, July 18, 2014 6:57 AM GMT

--Waves magic wand!-- a penny saved is a penny earned but the government will take it anyways
BLOXLUA
#140718047Friday, July 18, 2014 6:58 AM GMT

1) These are Free Modeled, get out. 2) The "cash gui" isn't a cash Gui, get out. 3) Get out.
rockinnoobs
#140721602Friday, July 18, 2014 8:05 AM GMT

1) Whats wrong with that? I can't make scripts. 2) It adds in a section that says "Cash" and you can add money with a certain script. 3) No.
EasilyUnknown
#140745569Friday, July 18, 2014 4:12 PM GMT

Honestly, you're better off learning LUA as it's more efficient and you can write better scripts than the forums can. a penny saved is a penny earned but the government will take it anyways
Notunknown99
#140745709Friday, July 18, 2014 4:14 PM GMT

I still don't get it. What IS this "LUA" everyone is talking about? I have never heard of it...
BLOXLUA
#140747160Friday, July 18, 2014 4:33 PM GMT

I have no idea what this "LUA" is-- oh wait, maybe it's a new brand of mayonnaise.
Notunknown99
#140747272Friday, July 18, 2014 4:34 PM GMT

It could be a car, maybe?
BLOXLUA
#140747440Friday, July 18, 2014 4:36 PM GMT

This kids is why you shouldn't misspell/incorrectly type anything on the ROBLOX Forums (or anywhere on the internet).
fret13103
#140749721Friday, July 18, 2014 5:03 PM GMT

You haven't actually said what you want done, you've just shown us a script, that is fine. All it does it open a door @ line 13 maybe this function onClicked() local p = game.Players:GetChildren() for i = 1, #p do local cash = p[i].leaderstats:findFirstChild("Points") if (p[i].Name ~= script.Owner.Value) then if cash.Value > upgradecost or cash.Value == upgradecost then if (p[i].Character.Torso.Position - script.Parent.Position).magnitude < dist then cash.Value = cash.Value - upgradecost WHAT YOU WANT IT TO DO HERE script.Parent.Parent:remove() end end end end end script.Parent.ClickDetector.MouseClick:connect(onClicked)
fret13103
#140749852Friday, July 18, 2014 5:05 PM GMT

Just put a local Object Value Int inside the player when he spawns, that will be your money, then rewrite the script so that instead of checking money it checks the Int value you have inside your char. Not very hard
rockinnoobs
#140765489Friday, July 18, 2014 7:51 PM GMT

I don't know how to do that. I was hoping someone could make the script that adds money work with that other script. Here is the script I got for adding money: moneyToGive = 100 debounce = false script.Parent.Touched:connect(function(hit) if debounce == true then return end player = game.Players:GetPlayerFromCharacter(hit.Parent) if player == nil then return end stat = player:findFirstChild("leaderstats") if stat == nil then return end cash = stat:findFirstChild("Cash") if cash == nil then return end debounce = true cash.Value = cash.Value + moneyToGive wait(2) debounce = false end)
rockinnoobs
#140821071Saturday, July 19, 2014 5:05 AM GMT

Bump
rockinnoobs
#140935393Sunday, July 20, 2014 8:25 AM GMT

Bump
rockinnoobs
#141367388Thursday, July 24, 2014 7:17 AM GMT

Bump... Again.
systematicaddict
#141368617Thursday, July 24, 2014 7:39 AM GMT

local cash = p[i].leaderstats:findFirstChild("Cash") Lol'd
rockinnoobs
#141595247Saturday, July 26, 2014 6:30 AM GMT

Never mind this blasted game then. No one is has helped me with this besides one person. I've already started making a game in something called Game Maker since barely anyone helped.
SirLuaScript
#141596031Saturday, July 26, 2014 6:43 AM GMT

Yes I can, you forgot this: print(string.sub("Analyics",1,4)) Enjoy ^_^

    of     1