just trying to get this to run and im getting a Vector3 expected error
v.Character.Humanoid.CFrame = mapclone.GameSpawn.CFrame + CFrame.new(math.random(-5,5), 2, math.random(-10,10))
just trying to get this to run and im getting a Vector3 expected error
v.Character.Humanoid.CFrame = mapclone.GameSpawn.CFrame + CFrame.new(math.random(-5,5), 2, math.random(-10,10))
You can’t add two CFrames together. You can just add a Vector3 to the CFrame though. Plus Humanoid doesn’t have a CFrame property, so it uses the :SetPrimaryPartCFrame method on the character’s model instead.
v.Character:SetPrimaryPartCFrame(mapclone.GameSpawn.CFrame + Vector3.new(math.random(-5, 5), 2, math.random(-10, 10))
meant to use the root part oops lol but yeah thank you
You could also just multiply the 2 CFrame values together (as you likely initially intended).
v.Character.Humanoid.CFrame = mapclone.GameSpawn.CFrame * CFrame.new(math.random(-5,5), 2, math.random(-10,10))
I believe this is in fact what I had in mind and why I was so confused why it wasn’t working!