#what the hell are cframes anyway
50 messages · Page 1 of 1 (latest)
np
alr
CFrame means Coordinate Frame
its a position and a rotation
great
CFrame.new(0,0,0)
ye
alr
to move a character u do
character:PivotTo(theCframeYouWantThemAt)
the two functions u will be working with are
GetPivot()
and
PivotTo()
they work on baseParts and models
the other values are optional
if u put them then they are set
other wise they are the defaults
CFrame.new() will return a CFrame at location 0,0,0
A datatype that represents both a 3D position and orientation.
read over that
u can make a cframe like that
too
for the angles u gotta use math.rad
alright
sometimes people put a part down to show where they wanna teleport the player
so u can have a part called "teleportPoint"
no
that thing u wrote wont work
--[[
this script teleports a Players character to the Chosen CFrame
GetPlayerFromCharacter returns the player or nil
]]
local TeleportPoint = CFrame.new()
part.Touched:Connect(function(hit) -- hit is the part that touched the part
local player = game.Players.GetPlayerFromCharacter(hit.Parent)
if player then -- checks if its a player or if its nil
player.Character:PivotTo(TeleportPoint) -- teleports to chosen CFrame
end
end)
alr
do u have this script under a part?
if so
local part = script.Parent
then u can do part.Touched:Connect bla blah
obviously its saying that youre using the wrong symbol, it even tells you the correct one to use
so replace the '.' with ':'
this GetPlayerFromCharacter
okay good
CFrame.new CFrame.Angles
theres another 3 values but i dont know what they are
radions
if you wanna change the angles
youd have to do CFrame.Angles(math.rad(90), 0, 0)
rad is radions
i think it converts radions into degrees
so if you wanna turn it 90 degrees do: