I need to make it so when the player sits down, and presses A or D, it uses an angular velocity to rotate it, the rotation works when I adjust it manually, but I cannot get it to rotate when I press A or D
I have 2 scripts, a local script and a server script They're both in the model
Here is the local script
local UIS = game:GetService("UserInputService")
local turn = game.ReplicatedStorage:WaitForChild("Turn")
if script.Parent.Occupant ~= nil then
UIS.InputBegan:Connect(function(key)
if key.KeyCode == Enum.KeyCode.A then
end
if key.KeyCode == Enum.KeyCode.D then
turn:FireServer(key, UIS)
end
end)
end
and here is the server script
local turn = game.ReplicatedStorage:WaitForChild("Turn")
turn.OnServerEvent:Connect(function(key, UIS)
UIS.InputBegan:Connect(function(key)
if key.KeyCode == Enum.KeyCode.A then
script.Parent.Parent.Wood.BaseRotation.AngularVelocity = -0.05
end
if key.KeyCode == Enum.KeyCode.D then
end
end)
end)
