This only fires once on a proximityprompt

Heres the code

script.Parent.Triggered:Connect(function(player)
print(“yes”)
player.Character.HumanoidRootPart.Position = game.Workspace:WaitForChild(script.Parent:GetAttribute(“PlacetoTele”)).Position
end)

Is it a local script? or is it a regular script?

Is placetoteli a vector3 value?

Regular script. The parents are a part, then a proximity prompt then the script

1 Like

No, it gets the string of the name of the part in the workspace

1 Like
local Proxy = script.Parent -- I like to call it that
Proxy.Triggered:Connect(function(Plr)
   local PlaceToTeleport = Proxy:GetAttribute("Place") -- CFrame Attribute
   Plr.Character:PivotTo(PlaceToTeleport)
end)

Alternatively:

local Proxy = script.Parent
Proxy.Triggered:Connect(function(Plr)
   local PlaceToTeleport = Your Item
   Plr.Character:PivotTo(PlaceToTeleport.CFrame)
end)

Change your Vector3 Value to a CFrame Value

1 Like

Try model:MoveTo that might work

alr, imma try this and ill say what happens

It works! Thank you so much. :smiley:

Still being worked on

If you want to make a proximityprompt

Create a normal proximityprompt

Make sure you have another proximityprompt named the same thing(just without the (2) at the end)

When you want to put it in a script, use the code above and change it to this

script.Parent.Triggered:Connect(function(player)
print(“yes”)
player.Character.HumanoidRootPart.Position = game.Workspace:WaitForChild(script.Parent:GetAttribute(“PlacetoTele”)).Position
player.Character.HumanoidRootPart.CFrame = game.Workspace:WaitForChild(script.Parent:GetAttribute(“PlacetoTele”)):FindFirstChild(“CFrame”).Value
end)

The last line is the one that rotates your player to make sure it’s facing the corret direction!

Thank you for reading this!

P.S. This is not a tutorial. I just posted about a find I came across.
]]