Realism — Make your games feel more immersive!

having another issue with this client, if there are more than like 5 users in game- the client doesn’t load properly (i think) and causes the onclientevent to not function as its supposed to. (this completely breaks the script making it unusable).

heyyyyyy yea ur debug didn’t rlly help. it runs everything just how i expected, but ignores the onclientevent depending on how many ppl are currently in game. no clue why, never had this bug before.

1 Like

where do i put the server script and the client?

I told you exactly what could be causing it.

yea. and im saying, it didn’t work.

Hey @Maximum_ADHD, please add the ability to disable stuff like the view bobbing/camera bobble and the walking sounds.

Also, I discovered a bug that if I go into Freecam mode, the thing that lets you see your entire body in first person interferes with the camera and it’s pretty annoying. Here’s another person complaining about it.

2 Likes

And i’m saying, you just didnt fix it. But what I said is causing it is exactly whats happening.

man, reading through this source code makes me feel like i’m writing my own code wrong… this package is so easy to read and makes so much sense

Gotta love that! Any time I work with any scripters, I emphasize heavily on being able to work on it myself as well. I understand not everyone has the ability to make well written, universal code, but man… when you find someone that does, it’s such a gift to others. Love it!

I’m not sure my changes in the script caused this but I’ve had this issue for a long time where the footsteps were not timed well and the sounds would get mixed up, I have kinda found a solution but I wonder if there was another way without making an extra player script.
Video:

1 Like

Thank you for open sourcing this system. :smile: As far as I have tested it, it works pretty well, however at the moment it doesn’t have a use for my projects, but I can just suggest to use that if you want to make an RPG!

Its quite great but, How would I send the position to server with some security?? for an fps game

Anything sent from the client to the server cannot be secured, what you are looking for is a server-authoritative character controller. I believe this has only been published once on Roblox:

It is Just for a gun using pitch and yaw as the Realism system currently uses. As any incorrect input could be disregarded

You could use this ubiquitous type of script to rubberband players who have moved too far too fast:

local RunService = game:GetService("RunService")
local Players = game:GetService("Players")

-- Store player's positions the last frame
local PreviousPositions = {}

RunService.Heartbeat:Connect(function(Delta)
	for _, Player in Players:GetPlayers() do
		local Character = Player.Character
		
		-- Make sure we don't create any errors with players who are dead or haven't fully loaded yet
		if not Character or Character.Humanoid.Health <= 0 or not Character.PrimaryPart then
			PreviousPositions[Player] = nil
			continue
		end
		
		-- Have they just loaded? Don't care about them until the next frame
		if not PreviousPositions[Player] then
			PreviousPositions[Player] = Character.PrimaryPart.CFrame - (Vector3.yAxis * Character.PrimaryPart.Position.Y)
			
			continue
		end
		
		-- How far have they travelled horizontally?
		local Difference = PreviousPositions[Player].Position - (Character.PrimaryPart.Position - Vector3.yAxis * Character.PrimaryPart.Position.Y)
		
		-- Check if they've moved more than they should be able to in a frame (the '* 2' is there for leeway)
		if Difference.Magnitude > Character.Humanoid.WalkSpeed * (Delta * 2) then
			Character.PrimaryPart.CFrame = PreviousPositions[Player]
		end
		
		PreviousPositions[Player] = Character.PrimaryPart.CFrame - Vector3.yAxis * Character.PrimaryPart.Position.Y
	end
end)
1 Like

i mean like, the gun position in world space because this module rotates the player and that changes the shooting position

I know this is very late, however did you work out if these sounds are okay to use or should I be replacing them in my game (from the default module) immediately?

Hi sword animation is not working. @Maximum_ADHD

I kind of just gave up on caring because I don’t think anyone’s going to die on a hill for footstep sounds that can be easily reproduced. I’ll go out of my way to make my own if I must, but I honestly don’t think it’s worth getting worried over.

2 Likes

Which sword you using this video? @Maximum_ADHD