Why is it saying this? Is it because I’m running this in a local script?
Can you show us the code so we can further help since the error message is coming from the client script.
local player = game.Players.LocalPlayer
local character = player.Character
local blood = character.Values.Status:WaitForChild("Blood")
blood.Changed:Connect(function()
print("hi")
end)
Try this:
local players = game:GetService("Players")
local player = players.LocalPlayer
local character = player.Character or Player.CharacterAdded:Wait()
local values = character:WaitForChild("Values")
local status = values:WaitForChild("Status")
local blood = status:WaitForChild("Blood")
blood:GetPropertyChangedSignal("Value"):Connect(function()
print("hi")
end)
What type of value does ‘Blood’ return? Is it a boolvalue or an intvalue etc?
This worked, thanks! It’s a doubleconstrainedvalue, not sure why I was getting this issue when I have a similar script running on a server script that runs no issue.
1 Like
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.