How to make a tool useable when your boolvalue = true
local CanUse = player.Backpack.CanEvolve
Tool.Activated:Connect(function()
if CanUse == true then
How to make a tool useable when your boolvalue = true
local CanUse = player.Backpack.CanEvolve
Tool.Activated:Connect(function()
if CanUse == true then
I’d consider looking at some Developer/API References first, there are some helpful articles that may put you in the right spot
https://developer.roblox.com/en-us/articles/intro-to-player-tools
https://education.roblox.com/en-us/resources/adventure-game-creating-tools
https://developer.roblox.com/en-us/articles/Boolean
There are a couple of ideas you can do, creating a BoolValue
, or just creating a Bool variable alone
i created the boolvalue and make it true i also cant use the tool
You’re checking if CanUse is equal to true instead of checking if the value that CanUse is holding is equal to true. Try doing this instead.
local CanUse = player.Backpack.CanEvolve
Tool.Activated:Connect(function()
if CanUse.Value == true then
ur variable returns the value’s name you need to go in da property > ‘Value’ or adding .Value
If you’re using a BoolValue
, define it at the start of your script so that you can check when it’s set to true/false
:
local CanUse --BoolValue here
local Tool = script.Parent
local Duration = 5
Tool.Activated:Connect(function()
if CanUse.Value == true then
CanUse.Value = false
wait(Duration)
CanUse.Value = true
end
end)
If your tool don’t have a handle then Activated
function does not work