Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Tools (This has been solved :D) [closed]

Asked by 10 years ago

How do I make a teleporting tool that has some sort of animation to it? Like the one in Castle Tycoon. Also maybe a Teleporting Gui? Maybe ike the one from Kingdom Life 2. It's just I can't figure it out even after my training with Lua Learners, and I really want to start making good games. Thanks for reading

  • Duck
0
Please click the Accept button under the answer that solved your problem. User#11893 186 — 10y

Locked by TheMyrco

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

2 answers

Log in to vote
1
Answered by
Unclear 1776 Moderation Voter
10 years ago

Animations are entirely up to you, unfortunately.

However, the teleporting part is simple. Assuming the variable character references the Character object for a specific player (the one we're teleporting) and mouse references the player's mouse...

mouse.Button1Down:connect(function()
character:MoveTo(mouse.Hit.p)
end)

You can read more about MoveTo on the Wiki.

Ad
Log in to vote
0
Answered by
nate890 495 Moderation Voter
10 years ago

What are you looking for exactly? A tool/gui that when used (clicked, pressed) your character gets moved to a set location? Or a tool that when you click your character moves to the position of your mouse (where you clicked?)

game.Players.LocalPlayer.Character:MoveTo(Vector3.new(0, 0 + 5, 0)) is the main bit of code you'll be looking for anyway. That's all I can give you with the information you provided. Comment on this answer and I'll update my post accordingly.