I've been looking everywhere but I can't find any examples or explanations I understand so could anyone please try and explain with some examples?
To make a client-sided projectile you need server script, local script, and remote event.
in the server script, you put remote:FireClient() to fire the event when your conditions are true (example)
local rs = game:GetService("ReplicatedStorage") local remote = rs:WaitForChild("RemoteEvent") local part = workspace.Part part.Touched:Connect(function(otherpart) local char = otherpart.Parent local player = game.Player:GetPlayerFromCharacter(char) if player then remote:FireClient(player) end end)
then on the local script, you put remote.OnClientEvent and connect it to function, this will make the local script wait for the remote to fire from the server script.
local rs = game:GetService("ReplicatedStorage") local remote = rs:WaitForChild("RemoteEvent") remote.OnClientEvent:Connect(function() local part = Instance.new("Part",workspace) part.Name = "PART" part.Material = Enum.Material.Neon end)
The script will create a part that only the player can see.So this is the basics of client-side events you do the same but you replace the code inside the function with cloning the projectile and CFrame and stuff to make projectiles whatever u are aiming for ...
To create a client-sided projectile, simply fire a RemoteEvent
to all clients. Each client can then create the necessary object(s) needed for the projectile, and change the position locally. This is better as opposed to the server doing this because it's redundant.