I created a code for a quiz, it works in local server test, but will it work in game? And will ANYTHING that worked in roblox studio local server test mode work in game? It's a local script in GUI
game:GetService("UserInputService").InputBegan:connect(function(Object)
if Object.KeyCode == Enum.KeyCode.Return then
for i, p in pairs (game.Players:GetPlayers()) do
if (p.PlayerGui:FindFirstChild("Question")) ~= nil then
if script.Parent.Answer.Text == "Mirror" then
workspace.Question1:Destroy()
workspace.Quest1:Destroy()
script.Parent:Destroy()
print("Succes")
end
end
end
end
end)

3 comments
please? just answer yes or no
This should work as long as its in a serverscript.
You are attempting to delete something from the server in a local script sow no this will not work.