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
1 | character:SetPrimaryPartCFrame()( "HumanoidRootPart" ).CFrame |
this syntax is invalid, the correct syntax would be
1 | character:SetPrimaryPartCFrame(AvailableSpawnPoints [ 1 ] .CFrame) |
For future reference the syntax of :SetPrimaryPartCFrame is as follows;
1 | model:SetPrimaryPartCFrame( -- desired CFrame location here ) |