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

How would you use CFrame of Player?

Asked by 8 years ago

How would you use the players position and move a object a certain position away from player?

0
Could you edit your post to include more information? RiftTalon 98 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

If your talking about the character, then u can simply get the position like this from server script, then change a part's CFrame which has the same or similar position as the character to move away from character.

local Part=game.Workspace.Part
game.Players.PlayerAdded:connect(function(Player) --when player joins game
    local Character=Player.Character--gets character, which is physical aspect of player
    Part.CFrame=CFrame.new(Character.Position+Vector3.new(10,10,10)
end

hope this helped! I didnt test btw, may have a bug.

Ad

Answer this question