You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
The first teleporter teleports my character, but the 2nd one won’t.
What is the issue? Include screenshots / videos if possible!
I believe for my code to be correct, but it still breaks and doesn’t print any errors.
Code:
local TelePoint = script.Parent.Parent.Parent.TelePoint
script.Parent.Triggered:Connect(function(Player)
print(1)
local TeleportGui = Player.PlayerGui.Teleport
local MainFrame = TeleportGui.MainFrame
local HumanoidRootPart = Player.Character:WaitForChild("HumanoidRootPart")
HumanoidRootPart.Position = Vector3.new(TelePoint.Position.X, TelePoint.Position.Y + 1.5, TelePoint.Position.Z)
end)
Video:
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Yes, I found nothing of relevance.
8 Likes
Have you tried comparing the two teleportation scripts to see what might be the problem?
2 Likes
They are the same code, I duplicated the script and put inside the ProximityPrompt
1 Like
Elkstra
(Elkstra)
August 8, 2023, 7:19pm
#4
could you add a print before and after the teleport is supposed to happen and send the output when (or if) it runs?
1 Like
Maybe try this.
local TelePoint = script.Parent.Parent.Parent.TelePoint
script.Parent.Triggered:Connect(function(Player)
print(1)
local TeleportGui = Player.PlayerGui.Teleport
local MainFrame = TeleportGui.MainFrame
local HumanoidRootPart = Player.Character:WaitForChild("HumanoidRootPart")
HumanoidRootPart.Position = TelePoint.Position + Vector3.new(0, 1.5, 0)
end)
2 Likes
I tried, it doesn’t print after script.Parent.Triggered:Connect(function(Player)
1 Like
Could you show us the server console because you’re only showing the client side errors. Your script is running on the server, so we won’t see any server errors, if you show us the client console.
1 Like
It’s the same, nothing on the server.
1 Like
if there are no errors that means you arent actually firing the function
1 Like
adrriannm
(adrian)
August 8, 2023, 7:25pm
#10
I’ve fired the function correctly, and it tends to work, but it breaks sometimes.
1 Like
ok then make a copy of the game and put it here
1 Like
thats the best way of finding the bug
1 Like
adrriannm
(adrian)
August 8, 2023, 7:32pm
#13
Alright, here’s the file:
e.rbxl (64.0 KB)
adrriannm
(adrian)
August 8, 2023, 7:33pm
#14
Also, I tried this. Nothing is different.
1 Like
LuxSemper
(Mister Semper)
August 8, 2023, 9:03pm
#15
1 Like
use cframe
char char char char
adrriannm
(adrian)
August 8, 2023, 9:05pm
#17
Works ty
local TelePoint = script.Parent.Parent.Parent.TelePoint
local Character = Player.Character
script.Parent.Triggered:Connect(function(Player)
local TeleportGui = Player.PlayerGui.Teleport
local MainFrame = TeleportGui.MainFrame
local HumanoidRootPart = Player.Character:WaitForChild("HumanoidRootPart")
Character:PivotTo(CFrame.new().Rotation + Vector3.new(TelePoint.Position.X, TelePoint.Position.Y + 1.5, TelePoint.Position.Z))
end)
LuxSemper
(Mister Semper)
August 8, 2023, 9:07pm
#18
1 Like
system
(system)
Closed
August 22, 2023, 9:07pm
#19
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.