Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why does this only work in studio?

death = game.Players.LocalPlayer.Character.Humanoid.Died:connect(function() script.Parent.Frame.Visible = true script.Parent.Sound:Play() end)

I have this in a local script, and it works fine. Just not in the actual game.

1 comment

0

Is there any error message when you test this in a game?

2 answers

✓ Accepted answer

Try this

plr = game.Players.LocalPlayer
plr.Character.Humanoid.Died:connect(function()
 script.Parent.Frame.Visible = true
 script.Parent.Sound:Play()
 end)

Also are there any error messages in the dev console?

Try it in a regular script then see what happens. ;)

This discussion is preserved as it was. New answers, comments, and votes are closed.