Help fixing problem that I have with Alvin_Blox mining simulator shop

Try checking if the humanoid is 0 in the shop script. Maybe that would help?

Sometime’s it doesn’t work because changing the position of camera at the place of reseted character,the camera gets anchored at the place where you reseted,reset takes a few seconds and to spawn a new character.
Try this

shopFrame.Visible = false

player.inShop.Value = false

wait(7)

camera.CameraType = Enum.CameraType.Custom

camera.CameraSubject = player.Character:WaitForChild(“Humanoid”)

Why are you hooking the .Died event to a loop? There’s no need for that.

@OP, just use this:

Player.CharacterAdded:Connect(function()
  -- Code here
end)
2 Likes

Oh oops, just remembered that you don’t need to do that. Thanks for reminding me.

This might work thanks to @THECOOLGENERATOR

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		game.ReplicatedStorage.PlayerReset:FireClient(player)
	end)
end)

I hope this helps

That would probably work, but it may just be easier to put the CharacterAdded locally, unless you have other functions serverside.

1 Like

He uses a remote event that’s why I did that.

1 Like

Yeah I know, I’m just saying that it’s not necessary unless you have other code server-side. You can move the whole thing local if that part of the code isn’t relevant to coins, items etc.

there’s nothing wrong with the remote event solution lol

1 Like

Yea, I’m just going to do that thanks.