#How do I make it so I can teleport like this?
1 messages · Page 1 of 1 (latest)
This is what happens to me, I am in the same position when I get out of the domain. Unlike in JJS
I want to make it so I teleport in a different position when I get out of the domain
Relative to the position I had in the domain
This is my code
** You are now Level 3! **
Store rhe initial spawn position of the domain as a cframe
Then at end of domain, store the end position
Convert to ObectSpace and use that as an offset to multiply your character from their spawn position
Also suggest using a raycast toward that position and using that distance instead if it his something so there’s no weird stuff like going thru walls
Also please don’t use wait() use task.wait() instead
@autumn haven
By these positions, I mean the character’s position. At start and end
You can get Cframe* instead which would be easier using Character:GetPivot()
I see
In this video I explain 2 intimidating but very useful functions for cframes in Roblox Studio. These functions are very helpful, and help you understand fundamental concepts in 3D space, object space and world space. Hope you enjoy!
▻Comment any questions down below!
▻Make sure to leave a like 👍
▻Subscribe!
https://www.youtube.com/c...
It seems like I have to go somewhere all of the sudden, but I’ll try to do this when I get back
I’m pretty new to scripting so I’ll try my best lol
Is there a difference?
yes
the explanation is long tho
but there are like 0 scenarios where using wait() is preferable
ok im back
sorry i took a break
so I did that
but it wont teleport me back
i got the cframe right as I activated the domain
then right when the domain is about to end
i get the end cframe
I then get the offset with the ToObjectSpace()
and multiply the offset by the startCFrame
so yea