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)
My problem is that the script will work successfully in ROBLOX Studio, but in a ROBLOX Server it will not work.
This is a Regular Script, It's parent is a brick inside a torso of a clone of a player's character
So I want it so when they touch the brick inside the torso it lets them press G to destroy the Character.
In my last post, someone pointed out that I should use a Remote Event and that I should change it to a local script but i feel like that didn't work.