My teleporter script is simple, It pivots the character to the cframe i want. But it keeps falling, How do i fix this?
Hey buddy, Could you share with us the script?
Y’know, You dont really need the script, i explained the script, pivotto basically
this is the data for tp
CFrame.new(Vector3.new(0,0,0))
I think you can guess the code.
It is near impossible for anyone to guess what the problem is when you have provided little to no information. In order for anyone to help, you will need to provide more than just 1 line of code.
How about including the section that does what you have described and include information such as if there are any errors. You could even include a video showing exactly what the problem is.
local offset = vector3.new(0, 5, 0) -- maybe adding a offset will help the character fall on top of the teleport part
character:PivotTo(TeleportPart.CFrame + offset)
but the way i do it is like this
-- a empty table where i will save all the teleport CFrames
local teleports = {}
-- loop all parts in the teleport folder
for i, part in ipairs(workspace.TeleportFolder:GetChildren())
-- save the cframe into the teleports table using the name of the part as the key
teleports[part.Name] = part.CFrame
-- destroy the part as we no longer need it
part:Destroy()
end
-- and now i can teleport to a cframe by using the name
character:PivotTo(teleports["Teleport1"])
when i place the teleport part into the teleport folder i place a little above the floor so that the character does not get stuck under the floor
Look, Imo the code is guessable if its near impossible to guess it im not sure what kind of programmer are you, i told that i used pivotto with this cframe and thats enough.
the problem is, not any errors, all im saying is that sometimes when i teleport, i fall down , thats all.
I will try this later. But i want a way to force the character to not fall, not just ofdsets
how about we don’t start a argument and you just share your code?
maybe you can use the Humanoid.HipHeight to workout how high the offset needs to be
local offset = vector3.new(0, character.Humanoid.HipHeight, 0)
character:PivotTo(TeleportPart.CFrame + offset)
or maybe
local height = character.Humanoid.HipHeight + character.Humanoid.RootPart.Size.Y * 0.5
character:SetPrimaryPartCFrame(TeleportPart.CFrame + vector3.new(0, height, 0))