im trying to make a sword fighting game but When i try to teleport players to a spawnpoint in the map i get this error any help?
character:SetPrimaryPartCFrame()("HumanoidRootPart").CFrame = AvailableSpawnPoints[1].CFrame table.remove(AvailableSpawnPoints,1)
In the beginning of your code you stated
character:SetPrimaryPartCFrame()("HumanoidRootPart").CFrame
this syntax is invalid, the correct syntax would be
character:SetPrimaryPartCFrame(AvailableSpawnPoints[1].CFrame)
For future reference the syntax of :SetPrimaryPartCFrame is as follows;
model:SetPrimaryPartCFrame( -- desired CFrame location here )