local UIS = game:GetService(“UserInputService”)
UIS.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.R then
Clone:MoveTo(CFrame.Angles(0, math.rad(0), 0))
end
end)
local UIS = game:GetService(“UserInputService”)
UIS.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.R then
Clone:MoveTo(CFrame.Angles(0, math.rad(0), 0))
end
end)
This should work:
local UIS = game:GetService("UserInputService")
UIS.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.R then
Clone:MoveTo(Clone.CFrame * CFrame.Angles(0, math.rad(0), 0))
end
end)
Cframe is not a viald member of Captin Model
that was the error
Try this:
local UIS = game:GetService("UserInputService")
UIS.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.R then
Clone:MoveTo(CFrame.Angles(0, math.rad(1), 0))
end
end)
It says Unable to cast CoordinateFrame to Vector3
local UIS = game:GetService("UserInputService")
UIS.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.R then
Clone.PrimaryPart.CFrame*=CFrame.Angles(0, math.rad(1), 0))
end
end)
Set the model a primary part and use this:
local UIS = game:GetService("UserInputService")
local Clone = workspace:WaitForChild("Model")
UIS.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.R then
Clone:SetPrimaryPartCFrame(Clone:GetPrimaryPartCFrame() * CFrame.Angles(0, math.rad(45), 0))
end
end)