#Why doesnt this return end script work

14 messages · Page 1 of 1 (latest)

sacred compass
#

so when the boolvalue.value is true its suppose to return end this script but my bool is true but its not return ending the script

#

i dont know if its the way the boolvalue is handled

#

this is the bool value script

#
local playerModel = Instance.new("Model")
playerModel.Name = player.Name .. "Data"
playerModel.Parent = game.Workspace
local boolValue = Instance.new("BoolValue")
boolValue.Name = "IsActivated"
boolValue.Parent = playerModel
harsh wadi
#

Honestly this is just a guess, Im sorry if it dosent fix it.

local UIS = game:GetService("UserInputService")
local plr = game.Players.LocalPlayer
local Debounce = true
Player = game.Players.LocalPlayer
Animation = script.Parent.Animation

local playerModel = workspace:WaitForChild(game.Players.LocalPlayer.Name .. "Data")
local boolValue = playerModel:FindFirstChild("IsActivated")

if boolValue.Value == true then
return()
end

UIS.InputBegan:Connect(function(Input)
if Input.KeyCode == Enum.KeyCode.Z and Debounce == true then
Debounce = false
local Track1 = Player.Character.Humanoid:LoadAnimation(Animation)
Track1:Play()
script.Fire:FireServer(plr)
wait(2)
Debounce = true
end
end)

sacred compass
#

alr

sacred compass
#

the reason it didnt work before was the way i was getting the bool

#

AHH

#

AND IDK HOW TO FIX

#

@harsh wadi how do i reference a boolvalue so its handled seperatly for players for example a GUI if someone walks on a part which shows a GUI on there screen you can make it so it doesnt show for everyone but just for that person

#

how do i make it do the same but with a boolvalue

harsh wadi
#

uhhhhh

#

Im not sure sadly.

sacred compass
#

dang its fine