local door = game.Workspace.Door1
local surfacegui = door.SurfaceGui.TextLabel
local plr = game.Players.LocalPlayer
door.Touched:Connect(function(touch)
if touch.Parent:FindFirstChild("Humanoid") then
if plr.leaderstats.Throws.Value < 99 then
print("Player Does Not Have Enough")
door.Transparency = 0.5
door.CanCollide = true
surfacegui.Visible = true
else
if plr.leaderstats.Throws.Value >= 99 and not plr:FindFirstChild("doorOpened") then
local d = Instance.new("IntValue")
d.Name = "doorOpened"
d.Parent = plr
plr.doors.DoorsOpened.Value = plr.doors.DoorsOpened.Value +1
if plr.doors.DoorsOpened.Value == 1 then
door.Transparency = 1
door.CanCollide = false
surfacegui.Visible = false
if plr.leaderstats.Throws.Value == 1 then
if door.Transparency == 0.5 then
door.Transparency = 1
door.CanCollide = false
surfacegui.Visible = false
if door.Transparency == 1 then
plr.leaderstats.Throws.Value = plr.leaderstats.Throws.Value - 100
end
end
end
end
end
end
end
end)
Why wont the script take away 100 throws?

2 comments
any errors you get during runtime?
nope