Alright, so I have a script that teleports the player I got off of the toolbox because I don’t know how to write these, anyways it checks if a value in the workspace is true, if it is then it will teleport the player. at line 20 it says
Expected identifier when parsing expression, got ‘=’
I kind of get what this means, but not enough to fix it. The code line is: (error at last equal sign)
humanoid.Parent.Torso.CFrame = CFrame.new(part.Position + Vector3.new(0,3,0)) or humanoid.Parent.UpperTorso.CFrame = CFrame.new(part.Position + Vector3.new(0,3,0))
For context, this is the whole script. Server script inside of workspace. Error at line 20
local folder = workspace.TeleportGui.teleportparts
local tools = folder:GetChildren()
local part = tools[math.random(1, #tools)]
script.RemoteFunction.OnServerInvoke = function(player)
local humanoid = player.Character.Humanoid
if humanoid.Parent:FindFirstChild("Torso") then
humanoid.Parent.Torso.CFrame = CFrame.new(part.Position + Vector3.new(0,3,0))
elseif humanoid.Parent:FindFirstChild("UpperTorso") then
humanoid.Parent.UpperTorso.CFrame = CFrame.new(part.Position + Vector3.new(0,3,0))
else
print("no torso/uppertorso was found in player "..player.Name)
end
if workspace.isround.Value == true and humanoid.Parent:FindFirstChild("Torso") or humanoid.Parent:FindFirstChild("UpperTorso") then
wait(1)
humanoid.Parent.Torso.CFrame = CFrame.new(part.Position + Vector3.new(0,3,0)) or humanoid.Parent.UpperTorso.CFrame = CFrame.new(part.Position + Vector3.new(0,3,0))
print("its true")
--
elseif workspace.isround.Value == false then
print("its false")
else
print("no torso/uppertorso was found in player "..player.Name)
end
end