I’ve been spending so much time trying to make this work with many other ways and so far it still won’t run. The local script is stored in StarterCharacterScripts and the values are also stored in the local script. I have a feeling that it might be why but i’m not sure.
--player
local player = game.Players.LocalPlayer
local Character = player.Character or player.CharacterAdded:Wait()
--functions
local functions = script:WaitForChild("Animatronics").Functions
--local dictionary_module = require(script.dictionary)
--getmodels
local AIs = workspace:FindFirstChild("AIs")
local Bonnie = AIs:WaitForChild("Bonnie")
--actions
local canJumpscare = functions.Bonnie:WaitForChild("CanJumpscare")
local JumpscarePos = AIs.Positions.MainJumpscare:FindFirstChild("JumpscarePos")
wait(10)
canJumpscare.Value = true
print("True")
canJumpscare.Changed:Connect(function()
if canJumpscare == true then
print("Jumpscare")
--Bonnie.HumanoidRootPart.CFrame = JumpscarePos.CFrame
end
end)
You’re listening for changes after setting the value to true. So it won’t capture that change. You should hook up the Changed listener before making changes to the value.