Simple line trace /teleport


When i try to make a simple teleport function with line trace + teleport it kinda works but when i aim for the sky it teleports me to where i originally began the game.
what i have so far is:

for the rest it works fine just the part that when u hit nothing u will get placed at the start again. I hope someone can help me out :slight_smile:

Thanks in advance.

Here is a simple way to do it :

Thanks for trying butt it doesn’t work still same problems when i try exactly this.

If don’t really get the problem you trying to solve !

If you don’t want to teleport when you hit nothing , just put a ‘Branch’ before 'Teleport ’

Try this I made this for third person


Well the problem is that when i aim for the sky i will get teleported to the start of the map where i spawn.
And when i aim for an object it works just fine :stuck_out_tongue:

but i guess i will play a bit and see what happens with the branchxd

You need to make a branch from the return bool . When it is false set the location to be the end point of the line trace instead

I just tried putting a simple branch betweenline trace and teleport and put the condition to blocking hit and that was it… **** i feel so stupid right now :’) anyways thanks for all the help guys:)