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

How do i make the player teleport?

Asked by 5 years ago

code:

local brick = script.Parent
local Teleport = game.Workspace.cool
local pos = Teleport.Position

local function check(part, hit)
    local player = game.Players:GetPlayerFromCharacter(part.Parent)
    local playermodel = workspace.GetPlayerFromCharacter

    if player then
        player.TeamColor = BrickColor.new(194)
        playermodel:moveTo(pos)

    end
end

brick.Touched:Connect(check)

The objective is that the player touches this brick and is teleported and has their team changed, while objects that fall in the playing field go past the teleporting brick and get deleted. The issue is I do not know how to make a teleporting script.

Answer this question