TruestBlu
(TruestBlu)
August 25, 2022, 6:45pm
#1
I have an FPS game currently. The raycast is on the client and the damage is on the server. How on earth would I secure that?
Lokos
(Lokos)
August 25, 2022, 6:50pm
#2
This tutorial demonstrates how a proper gun using raycasting should be made:
Preface
Alright so the developer hub and old wiki had this, although a few months ago it was removed from the former because it was just so terribly outdated it was a joke.
So I thought I should revive that old tutorial.
A lot has happened since that tutorial, like new raycasting api being added and filtering enabled being enforced and that tutorial was just never updated.
So I am making this with that all in mind.
Let’s begin!
Alright so first you will want your weapon.
I grabbed a Colt…
You would fire a RemoteEvent from the client with the position of the client’s mouse to the server, because you can then also calculate the ray on the server.
TruestBlu
(TruestBlu)
August 25, 2022, 6:51pm
#3
Thank you! I’ll try it out right now.