player = script.Parent.Parent.Parent.Parent.Parent.Parent
cost = 0
function checkForBat()
found = false
for i, v in pairs(player.Backpack.GetChildren()) do
if v.Name == "Bat" then
found = true
end
end
for i, v in pairs(player.Character.GetChildren()) do
if v.Name == "Bat" then
found = true
end
end
if found == true then
return true
else
return false
end
end
script.MouseButton1Click:connect(function()
leaderstats = player.FindFirstChild("leaderstats")
if leaderstats then
Money = leaderstats.FindFirstchild("Money")
if Money then
hasBat = checkForBat()
if Money.Value >= cost and hasBat == false then
Money.Value = Money.Value - cost
Bat = game.Lighting.Bat:Clone()
Bat.Parent = player.Backpack
end
end
end
end)
Nothing happens. The GUI is working perfectly, the script just won't do anything....
** The place link is >http://www.roblox.com/The-Purge-place?id=158668406< if it'll help.**

2 comments
You can use
game.Players.LocalPlayerinstead of thescript.Parent.Parent... mess.Thanks.