I was wondering if I could get some help with this small script I tested. For some reason, the If statement isn't responding, meaning the function won't run even if the value doesn't equal Rinzler. charData is a StringValue to be specific.
local charData = script.Parent.Data.CharacterData
local active = game.Workspace.Part
function change()
if not charData.Value == "Rinzler" then
charData.Value = "Rinzler"
print("Character has changed to Rinzler.")
end
end
active.Touched:Connect(change)
"Character has changed to Rinzler" isn't printing in the console no matter what I do.
Aucun commentaire:
Enregistrer un commentaire