Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why does this only work in studio?

Asked by 8 years ago

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.

0
Is there any error message when you test this in a game? UserOnly20Characters 890 — 8y

2 answers

Log in to vote
0
Answered by 8 years ago

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?

Ad
Log in to vote
0
Answered by
foxy83 15
8 years ago

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

Answer this question