Physics INSANELY slow

I don’t know if this is the right category, but as you can see in the video when the puck hits the green part it is supposed to respawn instantly but it respawns like 15 seconds later. The reaction times are insanely slow for some reason, I also noticed it stops happening after the first or second respawn. I want to fix this at the start of the game.

I have tried making the goal bigger and smaller and the puck weigh less and the floor less slippery but NOTHING has worked. Note that NONE of my scripts are causing this.

It behaves PERFECTLY after the first respawn

4 Likes

Did you set the network owner of the puck?

1 Like

I don’t really understand network ownership

1 Like

All you need to do is call BasePart.SetNetworkOwner and add the player who hit the puck as the parameter.

puck:SetNetworkOwner(playerWhoHitPuck)

keep in mind that this can only be done on the server.

If you don’t understand it, it’s basically the player who has control over the puck’s physics. Setting it to nil will cause it to be handled by the server.

2 Likes

I tried setting it to nil and the player, but the parts acts like there’s a HUGE amount of physics throttling still

1 Like

What is the SimulationRadius of your player before and after respawning?

1 Like

I don’t know what simulationradius is

1 Like

It’s the radius of your character where parts will have an automatic network owner.

You can get it by doing print(game.Players:GetChildren()[1].SimulationRadius) in the command bar.

1 Like

When i spawned in and put the command it said 6.253778457641602 in output

1 Like

6 studs seem like enough. Does this happen in-game or in the local test server?

1 Like

It does not work in studio or in the actual roblox game, i do not know why edit: i just noticed that it only happens in like the first 30 seconds of playing the game, then the physics “fix” themselves

1 Like

Show me the main script of the part…?

1 Like

This is the script in the goal

	if hit.Name == "Rock" then
		hit:Remove()
		local Rock = workspace.RockSpawn:Clone()
		Rock.Parent = workspace
		Rock.Name = "Rock"
		Rock.CanCollide = true
		Rock.Transparency = 0
		Rock.Anchored = false
		workspace.Values.Green.Value = workspace.Values.Green.Value + 1
	end
end)
1 Like

I cant really figure anything out with just that part, maybe try opening script performance in the View tab? And see which script takes the most performance

1 Like

Nothing happens, when it hits the goal part the scripts are still the same, and the touch script in the goal hasn’t even activated it’s like physics throttling

1 Like

Nothing in your script do a change for first spawn and next spawns?

Also the physic of your game is great! (In my opinion.)

Nothing changes in any of my scripts

As a workaround, you can respawn the player immediately after they join using Player:LoadCharacter() for now.

I meant when the puck respawns the physics are like fixed

How exactly is the puck spawned then?

1 Like