What do you want to achieve?
I want to find a solution to fix my Motor6D animations
What is the issue?
I’ve been working on a space shuttle project by animating the payload bay doors through motor6D but I’ve been experiencing problems to which I do not know how to fix. The motor6D only functions to the one who controls it while for the other people nothing is showing for them.
What solutions have you tried so far?
I was thinking of using a remote event to do this rather than just one server script, keep in mind that I am a new scripter so I might not be able to understand a lot of things. I have been trying to find posts similar to mine but to no avail, I just really need a solution.
SERVERSCRIPT
local open = false
local orbiter = game.Workspace.Orbiter
local bay = orbiter["PAYLOAD DOOR"]
local Lmotor = bay["Left Motor"]
local Rmotor = bay["Right Motor"]
script.Parent.MouseButton1Click:Connect(function(Bruh)
if open == false then
script.Parent.BackgroundColor3 = Color3.new(0.137255, 0.639216, 0)
open = true
Rmotor.Motor.Motor6D.DesiredAngle = 2.7
elseif open == true then
script.Parent.BackgroundColor3 = Color3.new(0.666667, 0, 0)
open = false
Rmotor.Motor.Motor6D.DesiredAngle = 0
end
end)
How about using a RemoteEvent? Since it seems that the script is local, normally the local is not replicated if it is not related to the player’s character.
Local
local open = false
script.Parent.MouseButton1Click:Connect(function()
if not open then
script.Parent.BackgroundColor3 = Color3.new(0.137255, 0.639216, 0)
else
script.Parent.BackgroundColor3 = Color3.new(0.666667, 0, 0)
end
open = not open
game:GetService("ReplicatedStorage").RemoteEvent:FireServer(open)
end)
Script
local orbiter = workspace.Orbiter
local bay = orbiter["PAYLOAD DOOR"]
local Lmotor = bay["Left Motor"]
local Rmotor = bay["Right Motor"]
game:GetService("ReplicatedStorage").RemoteEvent.OnServerEvent:Connect(function(Player, open)
if not open then
Rmotor.Motor.Motor6D.DesiredAngle = 2.7
else
Rmotor.Motor.Motor6D.DesiredAngle = 0
end
end)
Update:
Motors replicate to other players but with huge stutters and delay before being able to do something, also I used the code that you have sent me. (I tested both the roblox studio local server and ingame)