Hi, I have this function

game:GetService("RunService").RenderStepped:connect(function()
	if(keyHit == 'W')then
		obj.BodyVelocity.Velocity = obj.CFrame.lookVector*speed
		obj.BodyVelocity.P = 1250
		obj.BodyVelocity.MaxForce = Vector3.new(3000,3000,3000)
	end

I use render stepped so the objects CFrame is constantly updated. However, I then have to put htis in a local script. However, I want to make sure that everyone can see that the brick is turning. In the function, I am changing the brick's BodyVelocity property, so I'm wondering if the local script changing that will replicate the effect to the server?
Or will I have to put in a remote event inside the if statement that will fire every frame to the server, and then in a server script change the brick's velocity? Thanks!

4 comments

0

You forgot 2 end's which is "end", "end)"

0

It was a quick snippit of my code, the full script has the both ends, thanks though!

0

When asking, make sure you post everything, cuz everything gets checked by us XD

0

No. Changes made with a LocalScript will not affect the server. You must make a server script to change obj's velocity and use a RemoteEvent to tell the server script when to do so.