Screen shake in server script

I’ve got an ability in my game but i feel like it’s missing a screen shake at some point but since the local script inside the tool fires a remote that activates a server script i haven’t found a way to make a screen shake if anyone knows a way to do this please let me know

You cannot call for a module from a server script

You cannot screen shake from a server script

1 Like

You’d need the server script to communicate back to clients and tell them to do a screen shake. Although if your ability is a big load, I don’t recommend doing it on the server.

There is no camera on the server… therefore there cannot be a screenshake

1 Like

Ok… did you read my reply properly?

ngl you got me in the first half, but you said

There is no recommendation needed because it’s not possible…

Bruh I think you’re reading way too fast, I was talking about the ability he mentioned. He said a local script fires a remote event and makes the server do the actual heavy lifting of the ability. I said if his ability is a heavy load it should be replicated to clients instead of happening on the server.

2 Likes

Okay just did some testing my mistake there IS a camera on the server and you can manipulate it but other players won’t see it though

1 Like

Well you can’t really do it from the server since you need the camera, but you can try to do something like this;

1- You can make an OOP modulescript in ReplicatedStorage, passing the values you want, camera/shake intensity, etc.

2- From a Script in ServerSide, you use a remote to communicate to the client player and pass the values

MyRemote:FireClient(Player, shakeintensityvalue, duration, etc)

3- The remote code when communicating with the Player Client will call the ModuleScript and create the camera effect you want

MyRemote.OnClientEvent:Connect(function(ShakeIntensityValue, duration)

local MyCameraModule = CameraModule.New()

MyCameraModule.Intensity = ShakeIntensityValue

MyCameraModule.Duration = duration

MyCameraModule:Shake()

end

i ended up doing this but now i’ve got another problem accuring since i do want it to stay visible to other players the script has to be used on the server side so what i did was just add a wait in the local script and make the camera shake on the time it needs to the problem now is since i’ve got a wait in there i am not able to use the previous script i was using as cooldown

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.