local script
local Replstorage = game:GetService("ReplicatedStorage")
local userinput= game:GetService("UserInputService")
local player = game.Players.LocalPlayer
local Mouse = player:GetMouse()
local Remote = Replstorage:WaitForChild("Zap")
userinput.InputBegan:Connect(function(Input,Istyping)
if Istyping then return end
local keypressed = Input.KeyCode
if keypressed == Enum.KeyCode.X then
Remote:FireServer(Mouse.Hit)
print("2sx")
end
end)
script
local Replstorage = game:GetService("ReplicatedStorage")
local Remote = Replstorage:WaitForChild("Zap")
Remote.OnServerEvent:Connect(function()
print("worked")
local p = Instance.new("Part")
p.Parent = workspace
end)

1 comment
are you getting the "worked" msg