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

Proximity prompt tping everyone?

Asked by
TudiPYM 12
3 years ago
game.Players.PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(function(char)
        local proximityPrompt = script.Parent
        proximityPrompt.Triggered:Connect(function(player)
            local character = game.Players.LocalPlayer.Character
            character.humanoidRootPart.Position = game.Workspace.tptest.Position
        end)
    end)
end)

Im trying to make a proximity prompt that tp's the player that triggers it, but it tp's everyone.

0
are you making it in a LocalScript or a Script? It's best to do it as a LocalScript as it only affects the player that used it, I think qMrSpooky 20 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

Greetings, fellow scripter! I see you want a prompt that teleports the player that triggered it to a specific location. Well, first make sure it is in a local script. Second: Make sure not to use position in this case because it will dislocate the humanoid root part from the player's character, use CFrames. sorta like game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = destination.part.CFrame

0
If I make a local script the proximity prompt doesn't work at all, forgot to mention that TudiPYM 12 — 3y
Ad

Answer this question