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

car wont teleport as needed what is problem?

Asked by 3 years ago
Edited 3 years ago

i have gui button if i press it then car will teleport to place i needed but wheels wont move and when i sit in car wheels will tear it apart

local Camera  = game.Workspace.CurrentCamera
local startCFrame = CFrame.new(-30.12, 4.018, 22.29) * CFrame.Angles(0, 0, math.rad(-90))
local endCFrame = CFrame.new(-30.37, 5, -218.21) * CFrame.Angles(0,0, math.rad(-90))
local model = game.Workspace.cars.Rally7

script.Parent.MouseButton1Click:Connect(function()
    model:SetPrimaryPartCFrame(endCFrame)
    model.fhoodB.Anchored = false
    script.Parent.Parent.Parent.Enabled = false
    Camera.CameraType = "Scriptable"
    Camera.CFrame = game.Workspace.cars.Rally7.campartrace1.CFrame
    game.Players.LocalPlayer.character.LowerTorso.CFrame = CFrame.new(-30.37, 5, -218.21)

end)

my car

https://www.roblox.com/library/5462146752/Rally7

0
the teleport should be made via ServerScript Leamir 3138 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago

answered

0
never use local script for teleporting something MagicPineappleLOLKA -6 — 3y
Ad

Answer this question