Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 6 years ago

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

Log in to vote
0
Answered by 6 years ago

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

0
nothing changed SuperBeeperman 30 — 6y
0
Move that bottom 2 ends above the RemoteEvent function. KingLoneCat 2642 — 6y
Ad

Answer this question