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

Can I replicate a Torque?

Asked by 5 years ago

Please provide more explanation in your question. If you explain exactly what you are trying to accomplish, it will be much easier to answer your question correctly.

It's only general. If I can replicate a Torque, can I replicate any other constraints?

1 answer

Log in to vote
0
Answered by
rokedev 71
5 years ago

I'm not very familiar about what a Torque is, but to my knowledge you can replicate almost anything.

If I'm not stupid, a Torque is a Vector3 value? You could do this by replicating the Vector3 then applying the Vector3 to the server-side Torque, or vice versa depending on which way you're replicating.

-- // Client \\ --

local remote = game:GetService("ReplicatedStorage").MyRemoteEvent -- Example remote reference

local MyTorque = Vector3.new(12, 5, 72)

remote:FireServer(myTorque)

-- // Server \\ --

local remote = game:GetService("ReplicatedStorage").MyRemoteEvent -- same event

remote.OnServerEvent:Connect(function(Torque)
    print(Torque) --> Should print 12, 5, 72 but i'm too lazy to test it.
end


Wrote this all in ScriptingHelpers website, respond with any issues as needed :)

Ad

Answer this question