Try referencing the character and do Character:SetPrimaryPartCFrame( Put the CFrame here ) and in those parameters put the CFrame of the part you’re trying to teleport the player to
local tweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out, 0 , false)
local tweenGoals = {Size = Vector3.new(4.133, 3.1, 3.1)}
local effectPart = script.Parent.Parent.EffectPart
local size = effectPart.Size
used = false
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") and used == false then
used = true
game.ReplicatedStorage.CameraChangeEvent:FireClient(game.Players:GetPlayerFromCharacter(hit.Parent))
hit.Parent.HumanoidRootPart.Position = script.Parent.Parent.TeleportPart.Position
hit.Parent:SetPrimaryPartCFrame(CFrame.new(hit.Parent.PrimaryPart.CFrame.Position, effectPart.CFrame.Position))
hit.Parent.Humanoid.WalkSpeed = 0
hit.Parent.Humanoid.JumpHeight = 0
local tweenGoals2 = {CFrame = hit.Parent.HumanoidRootPart.CFrame * CFrame.Angles(-180,0,0)}
--local tweenGoals3 = {CFrame = hit.Parent.HumanoidRootPart.CFrame + hit.Parent.HumanoidRootPart.CFrame.ZVector + 50 }
effectPart.Attachment.ParticleEmitter.Enabled = true
effectPart.Attachment.ParticleEmitter2.Enabled = true
effectPart.Transparency = 0
wait(.3)
hit.Parent.HumanoidRootPart.Anchored = true
local tween = tweenService:Create(effectPart, tweenInfo, tweenGoals)
tween:Play()
print("Arcade machine activated!")
wait(7)
local tween2 = tweenService:Create(hit.Parent.HumanoidRootPart, tweenInfo, tweenGoals2)
local tween3 = tweenService:Create(hit.Parent.HumanoidRootPart, tweenInfo, {Position = workspace.ArcadeMachine.EffectPart.Position})
tween2:Play()
wait(4)
tween3:Play()
wait(3)
print("ss")
hit.Parent.Humanoid.WalkSpeed = 16
hit.Parent.Humanoid.JumpHeight = 7.5
hit.Parent.HumanoidRootPart.Anchored = false
hit.Parent:SetPrimaryPartCFrame(game.Workspace.ArcadeTeleports.Teleport1.CFrame)
--hit.Parent.HumanoidRootPart.Position = game.Workspace.ArcadeTeleports.Teleport1.Position
game.ReplicatedStorage.CameraChangeBackEvent:FireClient(game.Players:GetPlayerFromCharacter(hit.Parent))
--effectPart.Transparency = 1
effectPart.Size = size
effectPart.Attachment.ParticleEmitter.Enabled = false
effectPart.Attachment.ParticleEmitter2.Enabled = false
end
end)
Still has the same issue, no errors it just doesn’t do anything. I made it print something to make sure it was actually running the line of code and it did print.