Hey there, I changed my script. That's because the script doesn't work. I've thought of a better idea.
Do 2 parts, a part was a normal platform, let name it part1; another part is longer than the part1, it's the same size, but it just longer, lets name it part2. The part2 was as above at the part1, make it invisible and able to through, also, anchor the part2. By the way, parent the script to the part2. Idea inspired by this youtube video.
Later, enter this script:
local part2 = workspace.part2
function OnTouching()
print("touching")
if part2.TouchedEnded:Connect(function()
print("no touching")
end
end)
part2.Touched:Connect(OnTouching)
This might work. That works like this, if you're not touching, you'll not printing no touching. However, you touched the part, prints touching, and left the part. They'll print no touching.
Remember this idiom I created myself: "Always try to through the lasers, why don't use a hammer and cheat to the end?" We have a lot of possibilities to think, it's not the hardest question, it's was just has a problem that we can't figure out. If we can't do straightway, let just turn in another way.
So, if there doesn't work again, or you don't know what do I mean, comment below, I'll think another way to fix this up.
2 comments
you typo'd function
I edited my whole answer, check it out lol