-- THIS IS A NORMAL SCRIPT, NOT LOCAL, INSIDE OF A SURFACEGUI
function moveShuttle(cf)
model:SetPrimaryPartCFrame(cf)
local x = game.Players:GetChildren()
for i = 1,#x do
print("Scanning " .. x[i].Name)
if x[i].Backpack.InShuttle.Value == true then
print(x[i].Name .. " is inside shuttle")
local xchar = x[i].Character
local tor = xchar.Torso
local diff = (tor.Position-model.MainPart.Position)
local cframe = cf+diff
local rotcf = CFrame.Angles(math.rad(tor.Rotation.X),math.rad(tor.Rotation.Y),math.rad(tor.Rotation.Z))
tor.CFrame = cframe * rotcf -- THIS BASTARD HERE DOESNT WANT TO WORK
end
end
end
-- NOTE THIS IS JUST ONE FUNCTION, IF YOU WOULD LIKE ME TO EDIT IN THE WHOLE SCRIPT PLEASE TELL ME
So I'm trying to make a script that moves a shuttle in space, and if you're inside of it you move with it, everything is working fine except for the part that sets my character's Torso CFrame.
It doesn't do anything. Nothing. It's confusing me and is frustrating as hell. If any of you have a solution or can see what I'm doing wrong, I would love to hear it.
Also, no, no errors come up.
