The script is suppose to swap out the fake briefcase with the real brief case when a player touches the fake brief case but, it won't do it unless an intvalue is at 100.
Code for the briefcase swapper;
if script.Parent.Value.Value >= 99 then
while wait() do
game.Workspace.BriefcaseClone.Handle.Touched:connect(function()
wait(0.001)
local clone = game.ReplicatedStorage.Briefcase:Clone()
wait(0.001)
game.Workspace.BriefcaseClone:Destroy()
wait(0.001)
clone.Parent = game.Workspace
end)
end
end
I have another code that adds 1 point to the IntValue once it gets clicked;
script.Parent.ClickDetector.MouseClick:connect(function(c)
script.Parent.Value.Value = script.Parent.Value.Value + 1
end)
Help.

1 comment
help