|
| 18 Jul 2016 10:21 AM |
I want it that If you touch it you gain 10000 dollars. Cant figure what's wrong.
local Config = script.Parent.Configuration local Gamepass = Config.GamepassId.Value local Group = Config.GroupId.Value local Kill = Config.KillOnTouch.Value
local Door = script.Parent.Door
Door.Transparency = 0 Door.CanCollide = true
function AllowedIn(Player) if Player.userId == 0 then return false elseif Gamepass > 0 then if game.MarketplaceService:PlayerOwnsAsset(Player,Gamepass) then return true end elseif Group > 0 then if Player:IsInGroup(Group) then return true end end return false end
local Debounce = true
Door.Touched:connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then local Player = game.Players:GetPlayerFromCharacter(hit.Parent) if Player and Debounce then Debounce = false if AllowedIn(Player) then local bonus = game.ServerStorage.PlayerMoney:FindFirstChild(Player) if bonus then bonus.Value = 10000 end else if Gamepass > 0 then game.MarketplaceService:PromptPurchase(Player,Gamepass) end if Kill then hit.Parent.Humanoid.Health = 0 local Explosion = Instance.new("Explosion",workspace) Explosion.BlastPressure = 0 Explosion.Position = hit.Position else if hit.Parent:FindFirstChild("Torso") then hit.Parent.Torso.Velocity = Door.CFrame.lookVector * 0 end end end wait(0.3) Debounce = true end end end)
|
|
|
| Report Abuse |
|
|
Notwal
|
  |
| Joined: 31 Dec 2014 |
| Total Posts: 915 |
|
|
| 18 Jul 2016 11:22 AM |
You see, the problem is, it can't just be 10 grand. It's gotta be a loan. And a small loan at that. But most importantly, it's gonna be 1 million.
|
|
|
| Report Abuse |
|
|
|
| 18 Jul 2016 11:25 AM |
keyword: gain
bonus.Value = bonus.Value + 10000
This siggy is copyrighted © |
|
|
| Report Abuse |
|
|
| |
|
|
| 18 Jul 2016 12:34 PM |
Have you tried looking at the output window? It should tell you exactly what line of the script is broken.
http://wiki.roblox.com/index.php?title=Output |
|
|
| Report Abuse |
|
|
|
| 18 Jul 2016 03:52 PM |
I figured it out :) Thanks to everyone :D
|
|
|
| Report Abuse |
|
|