#Ive been trying to make this for like 10 hours and it just wont work
110 messages · Page 1 of 1 (latest)
why dont you just make it tp you to cframe.new tp1location.X, tp1location.Y, tp1location.Z
what 😭
oh i understand, how would i write that?
wdym
no
holdon let me show you what plr1 is
game.peopletotp.plr1.CFrame = CFrame.new(Tp1location.X, Tp1location.Y, Tp1location.Z)
local plr1 = nil
local plr2 = nil
_G.Under2Players = true
local nr1 = 0
local nr2 = 0
local playersTab = {}
repeat wait() until #game.Players:GetChildren() > 1
for _,v in pairs(game.Players:GetChildren()) do
table.insert(playersTab, v)
end
repeat
nr1 = math.random(1, #game.Players:GetChildren())
nr2 = math.random(1, #game.Players:GetChildren())
wait()
until nr1 ~= nr2
_G.Under2Players = false
plr1 = playersTab[nr1]
plr2 = playersTab[nr2]
end```
ty
ill try that and see if it works
i dont know your* variables so make sure to change them
so then do
player.Character:MoveTo(workspace.teleportpart.Position)
MoveTo?
yes
what is peopletotp?
plr1 holds the person being teleported
instead do my way
** You are now Level 9! **
because his looks in workspace
but you are getting the players from player service
so you will need to get the character of the player
Dude you messed up the CFRAME vals
so you can straight up do
Wiat let me try fix it up to you
game.Players.plr1.Character:MoveTo(vector3)
Yea this is one way to do that Or the other way is
there are a few ways
plr1.Character:SetPrimaryPartCFrame(cframe)
plr1.Character:MoveTo(vector3)
plr1.Character:PivotTo(cframe)
game. Players. Plr1. CFrame = tp1location * game.players.plr1.CFrane
I guess this can also be done not pretty sure
As typing in mobile lol
Thoughts @dusk hawk
So except plr1 we need to type out character
** You are now Level 5! **
but again you can just really just use MoveTo() and you can skip all of the cframing
cuz cframes for a lot of people is very confusing
Cool
Dude I never thought about move to never really found about it in the docs
So we can actually skip CFrames by using move to
But what about orientation I suppose it requires CFrames
Cool
if you want orientation you can use PivotTo
I don't know what was the use CFRAMES, like why did rbx studio even bother to put it
nah its actually really useful
cuz storing position and orientation simplifies so much code
But what about vehicles nad all
How would they work without CFrames
Any idea?
wdym
Like if we talk about plane physics in rbx studio how would that actually work can you explain?
normally id use roblox physics like body velocity and stuff
cuz cframing is very expensive in the server
Ok..
Wdym
like it uses a lot more data and whatnot
Is there specific documentation about it in roblox studio
Hmmm
not really, roblox isnt helpful with this stuff
So how do you learn all that?
testing stuff
Damn
looking at other peoples code too
I wanna actually know like its being really tough for me to develop in roblox I am learning from YouTube, docs but still I feel it's not enough for implementing in my game...
it took me awhile to get the hang of coding
its cuz like if you are learning coding for the first time its sooooo hard
Yea roblox dev is being a bit complicated for me
but like once you actually know coding and how it works you can understand other languages much better
Nope dude I have experience of
C++ and python
I don't actually find the programming logic difficult but the stuff roblox studio added in their engine
For the api
what i mean is that when you know how things like variables and loops work, you can already learn them more in another language
Of it like services, clients, events stuff
roblox luau is dumb af imo
Yea
and dude can you send me docs link of these stuff like move to, pivot and stuff
i learned them off of a roblox doors video lmfao
this has a little bit for those
Thx
u can always look it up too
wait
this
pivot to
Thanks a ton bud
how to i find the vector3 of the teleport part
part.Position
local Tp1Location = workspace.Tp1.Position
local Tp2Location = workspace.Tp2.Position
game.Players.plr1.Character:MoveTo(Tp1Location)
game.Players.plr2.Character:MoveTo(Tp3Location)
end```
so that should work?
Ok i think that works, now all I need to do is implement a leaderboard and then loop the script, I think i can find all of that on youtube