So Im trying to get a function to work through remote events because of FE
heres the code
Local Script
UserInput = game:GetService("UserInputService")
function BigGay()
p = Instance.new("Part")
p.Parent = workspace
end
local remote = game.ReplicatedStorage.RemoteEvent
UserInput.InputBegan:Connect(function(input,gameprocessed)
if input.KeyCode == Enum.KeyCode.G then
print('yaa prorooror da')
remote:FireServer(BigGay())
end
end)
And then the script
game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(player,spawnpart)
spawnpart()
end)
But this keeps erroring 20:33:34.236 - ServerScriptService.local:3: attempt to call local 'spawnpart' (a nil value)

1 comment
its not spawnpart() its BigGay()