Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

CFrame not teleporting, Any ideas on how to solve it?

We should be focusing in lines 22-29, everything else works, but that lines are printing everything but not teleporting the player, any ideas?

game.Players.PlayerAdded:Connect(function(Player)

local DefinitelyPlane = workspace:FindFirstChild("1")
local PlaneName = 1
local Plane = workspace:FindFirstChild(PlaneName)
local PositionXX = 87.18
local PlayerQuantity = 0
local O = false

    print(Player.Name)
    PlayerQuantity = PlayerQuantity + 1
     if script.Cars.Value < 9 then
     local RPlane = Plane:Clone() 
     script.Cars.Value = script.Cars.Value + 1
     PlaneName = PlaneName + 1
     PositionXX = PositionXX - 15
     RPlane.Parent = workspace
     RPlane.Name = PlaneName
     RPlane:MoveTo(Vector3.new(PositionXX, 5.1, -922.8))
     print("Not Enough Players")

game.ServerStorage.Enough.OnServerEvent:Connect(function(R)
     print("Enough Players! Starting Round...")
     local char = Player.Character or Player.CharacterAdded:Wait()
print(char)
     local hrp = char:WaitForChild("HumanoidRootPart")
print(hrp)
    hrp.CFrame = hrp.CFrame * CFrame.new(PositionXX, 8.1 , -922.8)
print(hrp.CFrame.Position)

end)
end
end)

1 answer

Hi SuperBeeper,

I think the problem is that you placed the RemoteEvent in ServerStorage. You should try placing it in ReplicatedStorage and then test it. Also, make sure your script that makes use of the RemoteEvent is in ServerScriptService. Also, don't forget to change your script accordingly to where you place the RemoteEvent.

##Hope I helped, and have a wonderful day/night.

Thanks,

Best regards,

~~ KingLoneCat

2 comments

0

nothing changed

0

Move that bottom 2 ends above the RemoteEvent function.

This discussion is preserved as it was. New answers, comments, and votes are closed.