I’m not good at scripting at all, yet I’m making a game and it turned out great so far! One of the last things I need to add, is respawning in under a second (solved), and making people respawn at the spot they died, without the “uh” sound (solved). Can you help me?
How disable “oof” sound: How do I remove the oof sound? - #3 by colbert2677?
How make respawn quicker: How to make the respawn time faster? - #2 by lSteveRogersl?
Do more research.
Edit: Here is info if you don’t get these posts.
Oof sound is in Humanoid root part, you can’t delete it. So make it volume 0.
For respawn quicker,
game.Players.RespawnTime = 1 --second you want.
Thanks! Can you help me further with the respawn function too?
Put a script in ServerScriptService for instant respawn (put a wait() if you want to extend when to load the character):
game.Players.CharacterAutoLoads = false
local humanoid = character:FindFirstChild("Humanoid")
if humanoid then
local Hum = character:FindFirstChild("HumanoidRootPart")
player.Character:FindFirstChild("HumanoidRootPart").Position = Hum.Position
As for the oof sound, simply add a blank script in StarterCharacterScript and name it “Sound”, then it will not play any sound because the script is simply blank. (Make sure it’s blank)
For some reson this breaks my gun script. The gun gets unequipped and I can not re-equip it. I also can’t move the 3rd person camera anymore.
I can’t see something wrong with this script. Do it gives error at output?
Only this one:
Workspace.UXZ16.Go to death point on respawn:4: Expected identifier when parsing expression, got ‘=’
I’m at phone, so I can’t code correctly but try that:
local spawnpoint game.Players.PlayerAdded:Connect(function(plr) plr.CharacterAdded:Connect(function(chr) char.Humanoid.Died:Connect(function() spawnpoint = chr.PrimaryPart.CFrame wait(game.Players.RespawnTime) chr.PrimaryPart.CFrame = spawnpoint end) end) end)
The script does what it should, but the camera and gun still break.
Shall I supply a video?
Then your model may be broken. Is game default bodypack is R6? That’s can because a script into your gun too, I recommend to do your own gun frameworks for don’t get bugs like it.
The game default bodypack is R6, yes.
I made this gun by combining free model scripts and really don’t feel like making one myself. Because I just. can’t.
I’ll try to make things work.
Well I actually made it out!
For the script that you want the sound to not play, instead you just close the volume instead and my research said that the died sound will appear in client only, so we just set the volume from client to 0 then we fire a event to a server to make a player respawn
Local scripts (place in startercharacterscripts):
local plr = game.Players.LocalPlayer
local char = plr.Character
char.HumanoidRootPart.Died.Volume = 0
I’ll give more information if you would like it, but I recommended you to try first!
Sorry dude, I can’t help you anymore i think, because I didn’t get any mistake at code.