Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

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

Asked by 4 years ago
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
0
its ("WeaponActive").Value DuckyRobIox 280 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago
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

Ad

Answer this question