DasKairo
(Cairo)
November 13, 2022, 12:36am
#1
Hello,
So i want to create a smooth projectile on the Server.
On The Server: The Object is frozen for a moment before moving
But on The Client: It moves how I would want it to
How would I do this?
While this is here, how would i delete projectiles once a Ray hits an Object?
2 Likes
astrozzyz
(astrozyz)
November 13, 2022, 12:38am
#2
Fire to every client to animate the projectile, and handle hit detection on the server
1 Like
Orbular3
(Orbular3)
November 13, 2022, 12:38am
#3
Try part:SetNetworkOwner()
Also if it’s fine on the client why does it matter for the server?
1 Like
DasKairo
(Cairo)
November 13, 2022, 12:53am
#4
I have tried this, it only made it slightly better but it still remained,
I want people to see certain projectiles like Bullet trail
1 Like
MrAfoba
(Afoba)
November 13, 2022, 1:07am
#5
The server will never be as smooth as the client.
If you want the server to wait, you can use Player:GetNetworkPing() to get, well, their ping, and wait accordingly.
Give an “ID” to the projectile, and send that id to the client when you make pass it. Then fire a remote to delete when you want it to be.
Handle the ray on the server, animate it on the client. You can only make it show what’s going on visually with the client unless there is another way of doing it. For your example; what I would do is shoot the ray on the server, wait however long it takes for the bullet to travel, and delete it. On the client, I would visually show the projectile moving for however long, and once reached you can delete it on the client when hit and then on the server if created on there.
Sorry if it sounds long and confusing.
DasKairo
(Cairo)
November 13, 2022, 1:47am
#7
No, it isnt, i understand,
But yeah, Im making the calculations with a RemoteEvent, but its relying on the ModuleScript i have
Inside it, it has a function, both for Server and Client.
The Server fires the Ray, Flash, And Damage
While the Client fires Case Ejection and Bullet Trails.
DasKairo
(Cairo)
November 13, 2022, 2:17am
#8
Hi,
I came up with a Solution by Combining @Orbular3 ’s, @astrozzyz ’s, and @skillednames ’s Solutions,
If only I could give 3 Solutions,
The Bullet Trail now gets destroyed when it hits an object
It turns out i was using SetNetworkOwner()
in correctly
The Bullet code is not inside the RemoteEvent
Case Ejection:Client
(Just for the Player to see)
Bullet Trail: Server
(For the Server to see)
Thank you!
Me firing in the Air LOL:
Who Should I give the Solution to?
DasKairo
(Cairo)
January 30, 2023, 4:44am
#9
Hi, So I am 78 Days Late (sorry.)
Ima just mark a post as Solution.
DasKairo
(Cairo)
January 30, 2023, 9:46pm
#11
That’s the Issue, I used all 3 of your Responses, and They worked, so I’m not sure who to give it to as all 3 make the system work.
astrozzyz
(astrozyz)
February 1, 2023, 1:55am
#12
make it rigged and give it to me because im better
(also i replied first)
system
(system)
Closed
February 15, 2023, 1:56am
#13
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.