Hey gamers. I was trying to make a click-to-move pad like classic roblox for nostalgic and useful purposes.
For some reason this is firing even if the mouse.Target does equal mpoint.Name (my part in workspace).
I have tried to find a solution on here but I haven’t come across one. This should work, and this is my problem.
while true do
wait()
if click == false then
print(mouse.Target)
print(mpoint.Name)
if mouse.Target ~= mpoint.Name then
mpoint.Position = Vector3.new(mouse.Hit.p.X, mouse.Hit.p.Y + 0.5 , mouse.Hit.p.Z)
print(mpoint.Position)
print("bruhhh this code is so garbage", mouse.Hit)
end
end
end
If I were to change this to happen if it were true, which according to the output is supposed to be happening, the part never fixes itself and stays still even if this is the only time it should be moving.
if mouse.Target == mpoint.Name then
The reason why I need to tell if it is touching itself or not is because it will take its current position and move on top of it and fly away. This video demonstrates it working and it doing the fly thing.
edit: fixed up a paragraph