I’m getting an error on my teleport script and I’m unable to solve the issue. Need a little help.
Here is the script.
local teleport1 = game.Workspace.Teleport1
--currentlyTeleporting is a bool vlaue
script.Parent.Touched:Connect(function(partThatTouched)
if partThatTouched and partThatTouched.Parent and partThatTouched.Parent.Humanoid and partThatTouched.Parent.currentlyTeleporting.Value == false then
local character = partThatTouched.Parent:FindFirstChild("Humanoid")
local teleportLocation = CFrame.new(teleport1.CFrame.X, teleport1.CFrame.Y + 5, teleport1.CFrame.Z)
character:SetPrimarytPartCFrame(teleportLocation)
local teleportingValue = character.currentlyTeleporting
teleportingValue.Value = true
wait(3)
teleportingValue.Value = false
end
end)
The error I’m getting
SetPrimarytPartCFrame is not a valid member of Humanoid "Workspace.Mufazl.Humanoid" - Server - Script:8
``
local teleport1 = game.Workspace.Teleport1
--currentlyTeleporting is a bool vlaue
script.Parent.Touched:Connect(function(partThatTouched)
if partThatTouched and partThatTouched.Parent and partThatTouched.Parent.Humanoid and partThatTouched.Parent.currentlyTeleporting.Value == false then
local character = partThatTouched.Parent:FindFirstChild("Humanoid")
local teleportLocation = CFrame.new(teleport1.CFrame.X, teleport1.CFrame.Y + 5, teleport1.CFrame.Z)
character.Parent:SetPrimarytPartCFrame(teleportLocation)
local teleportingValue = character.currentlyTeleporting
teleportingValue.Value = true
wait(3)
teleportingValue.Value = false
end
end)