local uis = game:GetService("UserInputService")
script.Parent.ClickDetector.MouseClick:connect(function(plr)
local say = 0
local hud = game.ReplicatedFirst.HUD:Clone()
hud.TextFrame.Visible = true
hud.TextFrame.Text.Text = "My mother locks the door when she puts me to sleep..."
hud.Parent = plr.PlayerGui
uis.InputBegan:connect(function(inst)
if inst.KeyCode == Enum.KeyCode.Space then
if say == 0 then
hud.TextFrame.Text.Text = "Guess I can't get out this way"
say = 1
elseif say == 1 then
hud:Destroy()
end
end
end)
end)
usual story: Works fine in PlaySolo but not in an actual server. When it comes to a server, the problem doesn't come until the player presses "Space". The GUI pops up on the players screen just fine, however when the player presses "Space", the text on the GUI doesn't change. Also, nothing is printed in the output relating to this script.
All help is appreciated.
