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: Server-sided "RenderStepped" wait, is it possible?

Previous Thread :: Next Thread 
edenojack is online. edenojack
Joined: 18 Jul 2008
Total Posts: 989
06 Oct 2015 03:10 PM
I've been messing around with a bullet mechanic in solo, but once going online, it freezes up because "RenderStepped" is unusable by the server.
Is there any method the server can use to imitate this?
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
06 Oct 2015 03:11 PM
if you need renderstepped in server you're doing it wrong

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
morashsPeasant is not online. morashsPeasant
Joined: 06 Jan 2011
Total Posts: 4944
06 Oct 2015 03:11 PM
Yep, also isn't it runservice.Hearbeat for server??

morashsPeasant is doing homework :/
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
06 Oct 2015 03:12 PM
there are very limited times where you'd actually need such a small wait time

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
morashsPeasant is not online. morashsPeasant
Joined: 06 Jan 2011
Total Posts: 4944
06 Oct 2015 03:14 PM
@litalela, YES. lol

morashsPeasant is a peasant
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
06 Oct 2015 03:17 PM
Use .Stepped on the server
Report Abuse
darkstriken is not online. darkstriken
Joined: 23 Oct 2010
Total Posts: 376
06 Oct 2015 03:29 PM
well, you can do something like this

i=1

while true do
--code
i=i+1
if i==3 then
i=0
wait()
end
end

but it is very inefficient
Report Abuse
edenojack is online. edenojack
Joined: 18 Jul 2008
Total Posts: 989
06 Oct 2015 03:39 PM
I'm using Stepped now, but because of the 1/60th to 1/30th of a second change, the bullets are running slower than desired :/
Cheers anyway guys!
Report Abuse
DermonDarble is not online. DermonDarble
Joined: 04 Jun 2015
Total Posts: 2576
06 Oct 2015 03:44 PM
You should be simulating the bullets on the client and doing actual hit detection on the server.

deriving center servers
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
06 Oct 2015 03:53 PM
USE FE NOOB
Report Abuse
rayk999 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
06 Oct 2015 03:54 PM
for i=1,100 do
print("hi")
coroutine.yield()
end


Red Blossoms
Report Abuse
CLIMAXIMUS is not online. CLIMAXIMUS
Joined: 22 Jun 2012
Total Posts: 1738
06 Oct 2015 03:57 PM
you shouldnt be cframing/positioning bullets, use bodygyros bodyvelocities bodypositions etc
Report Abuse
earthyreuben is not online. earthyreuben
Joined: 17 Jan 2010
Total Posts: 669
06 Oct 2015 03:57 PM
I like what @DermonDarble says. However, think if you were to do that (and you wanted other players to see it) you would have to set up an event so all clients (perhaps within a range) can see it.

You could use RemoteEvents and hook up a local script to fire it to a server script (using renderstepped). Or you can change the wait time in the settings.
Report Abuse
CLIMAXIMUS is not online. CLIMAXIMUS
Joined: 22 Jun 2012
Total Posts: 1738
06 Oct 2015 04:05 PM
if you want to control it from character, you can also use

-- server script

local GiveAccess = game:GetService("ReplicatedStorage").GiveAccess -- a remote event

local function GrantAccess(Player, Object)
if Object:IsDescendantOf(workspace) then
Object:SetNetworkOwner(Player)
-- makes it so local scripts can change positions and everyone will see it
end
end
GiveAccess.OnServerEvent:connect(GrantAccess) -- on activated

-- then activate from a local script and change the parts cframe using renderstepped it will work
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
06 Oct 2015 04:34 PM
Goes slower than desired?


1 stud every 60th of a second is the same as 2 studs every 30th of a second. Simply double their speed.
Report Abuse
edenojack is online. edenojack
Joined: 18 Jul 2008
Total Posts: 989
06 Oct 2015 04:56 PM
Okay heres how its hooked up
Using Filtering Enabled,
When a player clicks, the game recieves an event which has the details of a gun and the direction in which it faces.
From this information it "Fires" a bullet using iterated RayCasting to ensure that the bullets do not go through walls, or bounce, or deviate from their course. This is an issue that parts using BodyMovers face.
At the moment, the server controls the bullets for everyone, this is to ensure that if one computer runs faster than another (Rendering wise) that their bullets do not run faster then someone elses.

This is before fixing,
after fixing I did just what Warpsy suggested, realizing that it halves the movement time. The issue now is with the Particles, there are huge gaps between them. This is fixable.

What is a likely better choice is to find a way of creating and handling all of the bullets via the client THEN replicating the bullets to the server. The issue following is how these are seen on other clients.

Thank you for your help guys, will be fixing soon.
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