Local script
local UserInputService = game:GetService("UserInputService")
local debounce = false
if debounce == false then
UserInputService.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.E then
game.Players.LocalPlayer.PlayerGui.e.Frame.ePower.Visible = false
script.EventPepporni:FireServer()
local debounce = true
wait(3)
local debounce = false
game.Players.LocalPlayer.PlayerGui.e.Frame.ePower.Visible = true
end
end)
end
Normal Script
script.Parent.EventPepporni.OnServerEvent(function()
print("it worked!!")
local plr = script.Parent.Parent.Name
local plrpos = game.Workspace:FindFirstChild(plr.name)
local part = Instance.new("Part")
part.parent = game.Workspace
end)
