Hello, I do not know why this occurs and how I can fix it. I’ll show you a video so you guys can understand better:
As we can see in the video, the interaction worked fine until after I got teleported.
Script of the Teleporter:
script.Parent.Touched:Connect(function(plr)
local h = plr.Parent:FindFirstChild("HumanoidRootPart")
if h ~= nil then
h.Position = Vector3.new(50.75, -10, -45.5)
end
end)
Script of the ProximityPrompt:
local TweenService = game:GetService("TweenService")
local secret = workspace.sewer.secret
local secretRoot = secret.PrimaryPart
local secretSwingInfo = TweenInfo.new(2, Enum.EasingStyle.Quad, Enum.EasingDirection.In
)
local secretSwingTween = TweenService:Create(secretRoot, secretSwingInfo, {
CFrame = secretRoot.CFrame * CFrame.new(7, 0, 0)
})
local PP = script.Parent.ProximityPrompt
PP.Triggered:Connect(function()
PP.Enabled = false
secretSwingTween:Play()
script.Parent.Stone:Play()
wait(5)
secretRoot.CFrame = CFrame.new(192.05, 1.479, -4.2)
PP.Enabled = true
end)