Just remove the table.find (3-0 characters)
No, I meant the whole entire thing. The whole if statement only.
local TouchingParts = part:GetTouchingParts()
if not TouchingParts["Wall"] then
TouchingWall = false
print("TouchingWall",TouchingWall)
else
TouchingWall = true
print("TouchingWall",TouchingWall)
end
still printing only once
Also, is all of this code in the OnTouched…
I put it in OnTouched but it now won’t print when you stop touching the wall, touching the wall it functions fine
part = char.Collider
local function onTouched(otherPart)
local TouchingParts = part:GetTouchingParts()
if not TouchingParts["Wall"] then
TouchingWall = true
print("TouchingWall",TouchingWall)
else
TouchingWall = false
print("TouchingWall",TouchingWall)
end
end
part.Touched:Connect(onTouched)
You have it backwards, remove the not.
the same issue still
I gotta go, if you find out how to solve it. Cool, Sorry for not being able to solve this but in my head, it makes sense.
at this point, I think it’s safe to say that my method is flawed in some way. so I’m going to put this on the shelf, do some research on raycasting and give it a go that way. consider this post closed now. Thank you for the help you have given me, it has helped me learn a few new things about Roblox scripting. Have a great rest of your day/night