-
What do you want to achieve? a script that changes the text of the TextLabel to whatever the value of magic is IF the player is a witch
-
What is the issue? its saying that value is not a valid member of Witch (which is a boolValue)
-
What solutions have you tried so far? ive tried looking up but nothing useful came up
here’s my script
local player = game.Players.LocalPlayer
local character = player.Character
local witch = character:FindFirstChild("Witch")
local magic = character:FindFirstChild("Magic")
local magicCapacity = character:FindFirstChild("MagicCapacity")
local main = script.Parent.Frame.Main
local MagicGui = script.Parent
local Text = script.Parent.Frame.TextLabel
if witch.Value == true then -- the line it errors on
MagicGui.Enabled = true
Text.Text = magic.Value.."/"..magicCapacity.Value
end
all help is appreciated <3