Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

I created a bool value in player but now how would i change it with other scripts?

local weapona = Instance.new("BoolValue", player.Character)
weapona.Name = "WeaponActive"
weapona.Value = false			
--^^^^first script
--vvvv second script 
if Character:FindFirstChild("WeaponActive") == false then
	print("1")
elseif Character:WaitForChild("WeaponActive") == true then 				
	print("0")
end

1 comment

0

its ("WeaponActive").Value

1 answer

✓ Accepted answer
local weapona = Instance.new("BoolValue", player.Character)
weapona.Name = "WeaponActive"
weapona.Value = false           
--^^^^first script
--vvvv second script 
if Character:FindFirstChild("WeaponActive") == false then --Put .Value after ("WeaponActive")
    print("1")
elseif Character:WaitForChild("WeaponActive") == true then --Put .Value after ("WeaponActive")             
    print("0")
end

When using bool values and checking if there false or true you gotta do .Value after the boolvalue thats why it aint working

This discussion is preserved as it was. New answers, comments, and votes are closed.