generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Physics-defying part!

Previous Thread :: Next Thread 
TeamAugment is not online. TeamAugment
Joined: 30 Apr 2015
Total Posts: 5
31 Aug 2015 12:00 AM
I have projectiles that are shot via a script in ServerScriptService. Once these projectiles are shot, the first few times they, as expected, fly forwards (they have body forces that cause it to have anti-gravity)
After a (tested) random amount of times *usually around 5-15*, the shots will begin to freeze almost immediately after launch, and when I checked their properties, they were neither anchored, or connected to anything via joints, welds, or surfaces. They also still retained the velocity set by the script (which means they should be flying forward).I built everything in the game and nothing has a direct effect on these parts besides roblox's physics engine.
Also, When I change the velocity of the brick to any new value, the brick will obey the new velocity (despite the old velocity not being obeyed).

The whole script runs perfectly when ran client-sided, but it has to be server-sided due to filtering.

So yeah, I want to blame the physics engine, and if it is I need to find a workaround, but it could still easily be my fault.

Any solutions or ideas about what the problem could be are very welcome :)
Report Abuse
OzzyFin is not online. OzzyFin
Joined: 07 Jun 2011
Total Posts: 3600
31 Aug 2015 12:16 AM
do the parts get stuck for .2 seconds into the very first position, then launch?

I've had this one, the fix was to create the bullet first for the player who shot, then fire a remoteevent from client who shot and through server script fireallclients(playerwhoshot,propertiesorsomething)
in locsl script you'd use .OnClientEvent(playerwhoshot,props), check if playerwhoshot is not localplayer and create the bullet or whatever with props given

not the exact same problem I guess but that was the solution I had

i gtg to school in a bit so this was rushed on my phone
Report Abuse
Xephyric is not online. Xephyric
Joined: 26 Mar 2009
Total Posts: 2270
31 Aug 2015 02:17 AM
(Also rushed and on phone, I'm the op on a different account.)
Yes, well it pauses, fires, and then stops after an extremely short amount of time.
Sorry if I misunderstood, but are you saying that instead of firing a script server side to launch the projectiles, that I should just fire the script locally for every client?
Report Abuse
Xephyric is not online. Xephyric
Joined: 26 Mar 2009
Total Posts: 2270
31 Aug 2015 02:19 AM
I would try it but I need to get to bed. I will try to do this in the morning if I have time, but most likely will do it after school (13 hours from now)
Report Abuse
OzzyFin is not online. OzzyFin
Joined: 07 Jun 2011
Total Posts: 3600
31 Aug 2015 03:11 AM
so basically

from client:

>button1down
>> create bullet with props
>>fire remoteevent(localplayer,properties of bullet)
>>>handle collisions from client and tell server to handle damage and stats for hit

from server:

>OnServerEvent(plr,props)
>>FireAllClients(plr,props)

from client:

>OnClientEvent(plr,props)
>>check if plr isnt localplayer
>>>create bullet with props for the new client

this is how I do it
I could send an example of my code when home in 2-3 hours
Report Abuse
TeamAugment is not online. TeamAugment
Joined: 30 Apr 2015
Total Posts: 5
31 Aug 2015 08:19 AM
Yeah, I understand how to do it, but I'm still kind of curious why it didn't work when ran by the server :/
So was roblox's end after-all?
Report Abuse
TeamAugment is not online. TeamAugment
Joined: 30 Apr 2015
Total Posts: 5
31 Aug 2015 08:40 AM
I tried it, and it works fine, but feel free, anyone who has an explanation to the cause of this, to explain because I'm very curious why it had this erratic behavior.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image