Remote Event firing when server starts?

Here is my Local Script:

local proxPrompt = game:GetService("ProximityPromptService")

local event = game.ReplicatedStorage:WaitForChild("GiveIslandPerm")

local PI = workspace.PlayerIslands:WaitForChild("PlayerIsland")

local alreadyOwner = false

local plr = script.Parent.Parent.Name

--proxPrompt.PromptButtonHoldEnded:Connect(function(gui)
--	local owner = gui.Parent.Parent:FindFirstChild("Owner")
--	if alreadyOwner == true then
--		print("already owner")
--	else
--		event:FireServer(plr, owner)
--		proxPrompt.MaxPromptsVisible = 0
--		alreadyOwner = true
		
--	end
		
--end)

SERVER SIDE–

local proxPrompt = game:GetService("ProximityPromptService")

local function onServFire(plr, owner)
	if owner == nil then
		print("made new owner")
	else
		print("fart")
	end
	
end

Event.OnServerEvent:Connect(onServFire())

Its quite late rn so maybe its something obvious, but I dont see it.

there is nothing to call the remote event to fire, yet it feels like it anyways.

can someone please help?

1 Like

change this:

to this:

Event.OnServerEvent:Connect(onServFire)

1 Like

Ah, ofcourse.

Thanks for the reply, problem is solved now

No problem, glad i could help.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.