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

How do I make a tool that can pull players to you or are you even able to make that?

Asked by 4 years ago

I’m making this game and I need a tool what you can use so you can pull players to you from where you are standing at. Something like scorpions spear from mortal combat and I’m wondering how I’m suppose to make that can you guys help?

1 answer

Log in to vote
-1
Answered by 4 years ago
Edited 4 years ago

Please provide explanation with your answers. Simply posting code does not spread knowledge of integral scripting processes which helps people understand the logic and reasoning behind your answer.

Just change the players' positions in a regular Script.

local tool = script.Parent

tool.Activated:Connect(function() -- when player clicks while tool is equipped
    for _, player in pairs(game.Players:GetPlayers()) do -- loops through each player in the server
        player.Character.HumanoidRootPart.CFrame = tool.Parent.Parent.Character.HumanoidRootPart.CFrame -- changes players' CFrames to the exact CFrame of the player holding the tool 
    end
end)
0
Thanks theofficialJorden -7 — 4y
Ad

Answer this question