Goal: I would like one script (script A) to allow another script to work (script B) based on transparency.
Problem #1: Is it possible to store my tools in ServerStorage rather than Lighting?
Problem #2: How can I make it so one script CANNOT function until the transparency of it is equal to 0?
Problem #3: Are the booleans false and nil completely alike?
Other Information:
WORKSPACE: Project (folder) -> Functions (folder) -> HammerGiver, HammerOutput, WrenchGiver, WrenchOutput, Planks (grouped model)
LIGHTING: Tools (folder) -> Hammer, Wrench
HAMMER GIVER/INPUT SCRIPT
function OnClick(PersonWhoClicked)
local y = PersonWhoClicked.Backpack
local z = game.Lighting.Tools["Hammer"] --hammer stored in "Tools" folder in "Lighting"
z:Clone().Parent = y --gives hammer to player
game.Workspace.Project.Functions.HammerGiver:Destroy() --destroys hammer giver
end
script.Parent.ClickDetector.MouseClick:connect(OnClick)
HAMMER OUTPUT SCRIPT
script.Parent.Touched:connect(function(p)
if p.Parent.Name == "Hammer" then
game.Workspace.Project.Functions.HammerOutput.MeshPart.Transparency = 0 --allows the new location of the hammer to be visible
p.Parent:Destroy() --destroys tool from backpack
game.Workspace.Project.Functions.Planks.Plank1.Anchored = false --allows wooden plank borders to fall
game.Workspace.Project.Functions.Planks.Plank2.Anchored = false
game.Workspace.Project.Functions.WrenchGiver.MeshPart.Transparency = 0 --reveals next objective or object for game
end
end)
WRENCH GIVER/INPUT SCRIPT PROBLEM!!!
function OnClick(PersonWhoClicked)
local y = PersonWhoClicked.Backpack
local z = game.Lighting.Tools["Wrench"] --gives wrench from "Lighting"
z:Clone().Parent = y
game.Workspace.Project.Functions.WrenchGiver:Destroy() --destroys tool giver
end
script.Parent.ClickDetector.MouseClick:connect(OnClick)
Notes: -hammer transparency is 0 -wrench transparency is 1
POSSIBLE SOLUTIONS
- How do I make it so the WrenchGiver does not work until the MeshPart transparency is 0?
- How do I remove the ClickDetector from the WrenchGiver until the MeshPart transparency is 0?

2 comments
Yes you can store the tools in ServerStorage, it is actually recognized as a bad practice to store Instances In Lighting. If the tools are only only referenced via ServerScripts, the tools shall be placed in ServerStorage, otherwise ReplicatedStorage. Secondly, attach :GetPropertyChangedSignal() to the Instance and pass Transparency as the target,
Set the Disabled boolean to True of the program you wish to not run, then have the Script set it to false upon the Transparency being verified as 0 to immediately run it. Also, no, false and nil are no identical.. in fact, nil is not even a boolean, or even an operand.