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

How do i make a player teleport where their mouse is? [closed]

Asked by
rexpex 45
7 years ago

Im trying to make a script that teleports a player at a limited distance, but my script is not working very well. I am completely baffled on how to go about making a limit distance that the player can go ;-;

tool = script.Parent.Parent.Parent
player = tool.Parent.Parent
limit = 15
mouse = player:GetMouse()
Dash.OnServerEvent:connect(function(player, mousehit)
    local torso = player.Character:findFirstChild("UpperTorso")
torso.CFrame = CFrame.new(Vector3.new(mousehit))

end)

Marked as Duplicate by cabbler, pluginfactory, User#5423, abnotaddable, and Goulstem

This question has been asked before, and already has an answer. If those answers do not fully address your question, then please ask a new question here.

Why was this question closed?