script.Parent.Touched:connect(function(plr)
local UIS = game:GetService("UserInputService")
UIS.InputBegan:connect(function(input)
if input.KeyCode == Enum.KeyCode.G then
script.Parent.Parent.Parent:Destroy()
end
end)
end)
COMMUNITY QUESTION
My Script works in studio but when I test it in a Server it doesn't work?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

7 comments
Use a code block
there
UserInputServing only works in localscripts.
service*
You would have to use a remoteevent.
Ok thanks
It wont work