I have a script that checks for a player touching another player, and at the end of the script, it checks for a changed value. The first half works just fine, but the second half where it starts checking for a changed value isn't working.
local grabblock = script.Parent.Torso
local vampchar = script.Parent
grabblock.Touched:Connect(function(grabbedchar)
if grabbedchar.Parent:FindFirstChild("Humanoid") then
if vampchar.BeastMode.Value == true and grabbedchar.Parent.Role.Value ~= "Vampire" then
vampchar.Grabbing.Value = true
vampchar.GrabbingWho.Value = grabbedchar.Parent.Name
grabbedchar.Parent.Grabbed.Value = true
grabbedchar.Parent.GrabbedBy.Value = vampchar.Name
local moveto = game.ServerStorage.GrabWeld:Clone()
moveto.Parent = grabbedchar.Parent
moveto.Attachment0 = grabbedchar.Parent.Torso.GrabAttatch
moveto.Attachment1 = vampchar.Torso.GrabAttatch
end
end
vampchar.BeastMode.Changed:Connect(function()
if vampchar.BeastMode.Value == false then
vampchar.Grabbing.Value = false
vampchar.GrabbingWho.Value = ""
grabbedchar.Parent.Grabbed.Value = false
grabbedchar.Parent.GrabbedBy.Value = ""
end
end)
end)
grabbedchar.Parent is supposed to be the character that touched the other character, but on the second half, it starts looking at the character's accesories.

2 comments
How about using the explorer to see if the Grabbed value does exist and if does then it’s a script problem and you should prob wait for the item and if it does not exist it prob failed to generate
The grabbed value does exist, in the character, the script here is erroring because its trying to look inside the accessories of the player for it, the top half of the script does not.