Why isn't function playing when boolvalue is updated?

You can write your topic however you want, but you need to answer these questions:

I want to make it so whenever something spawns in it fades into existence.

The function isn’t playing at all, even when it is bluntly told to do so. There has been no errors reported by Roblox Studio in the output feature; I just can’t understand. The script is enabled aswell.
–I have gotten the function to play by enabling the ready value through this script, though its meant to be “ready’d” through another script and it has to be this way.

Me and my friend have tried writing the tweens in different ways but then I figured out one of the ones we tried before actually does properly tween it so it must be that the function isn’t playing. I just can’t comprehend it.
– I am trying to figure out why this function isn’t playing for no reason.

local TweenService = game:GetService("TweenService")
local TransInfo = TweenInfo.new(1.5, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 0, false, 0)
local ObjectGoal = {}
ObjectGoal.Transparency = 0
local GUIGoal = {}
GUIGoal.ImageTransparency = 0.5
local ArrowTween = TweenService:Create(script.Parent.Arrow, TransInfo, ObjectGoal)
local HitTween = TweenService:Create(script.Parent.Hitbox, TransInfo, ObjectGoal)
local GuiTween1 = TweenService:Create(script.Parent.Hitbox.BillboardGui.ImageLabel1, TransInfo, GUIGoal)
local GuiTween2 = TweenService:Create(script.Parent.Hitbox.BillboardGui.ImageLabel2, TransInfo, GUIGoal)
task.wait(3)
ArrowTween:Play()
HitTween:Play()
GuiTween1:Play()
GuiTween2:Play()
wait(5)
local function Tween()
	print("Uzbekistan") --Uzbekistan 🤯
	ArrowTween:Play()
	HitTween:Play()
	GuiTween1:Play()
	GuiTween2:Play()
end
script.Parent.Ready:GetPropertyChangedSignal("Value"):Connect(Tween)
Tween()


‘’‘lua
local function ArrowOrb()
if Player.PlayerStats.FightEnabler.Value == true then
local Arrow = game.ReplicatedStorage.Orbs.StackBow.ArrowOrb:Clone()
Arrow.Parent = workspace
local WallPos = Player:WaitForChild(“Wall”):GetModelCFrame()
local Z1 = (WallPos.Z+(1.16Player.PlayerStats.Range.Value))
local Z2 = (WallPos.Z-(1.16
Player.PlayerStats.Range.Value))
local OrbPositionZ = math.random(Z2, Z1)
local X1 = (WallPos.X+(1.16Player.PlayerStats.Range.Value))
local X2 = (WallPos.X-(1.16
Player.PlayerStats.Range.Value))
local OrbPositionX = math.random(X2, X1)
Arrow:PivotTo(CFrame.new(OrbPositionX, (WallPos.Y + 10), OrbPositionZ))
task.wait(0.1)
Arrow.Ready.Value = true
end
end
‘’’
– I can confirm that the arrows are being summoned

The goals are empty so you won’t notice any differences. Add the property you want to tween into there and it should work.

Example:

local GUIGoal = {BackgroundTransparency = 0.5}
1 Like

Look at the script right below these two lines.
Remember: This is about the function not playing, not the tweens breaking. It never prints “Uzbekistan” so even if the tweens don’t play it should work. And the tweens DO work. I have used the technique of:
local goal = {}
goal.value = bool/number
and it has worked for me the entire time.

A: Does the Value property of Ready actually change?
B: Remove all the waits in the code

A: Yes
B: Didn’t work for some reason.
– Ready is an existing BoolValue in the part

The script seems fine, and when I tested it in studio with my own parts it ran fine as well with the function printing “Uzbekistan”. The only reason I can see the function not firing is the script being either A: A local script in server script service or someplace outside the player client or B: A server script parented to the player client. If it’s neither then I have no clue on what could be making the function not run.
Good luck finding out though!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.