Remote Function: "Attempt to call a instance value"

Remote function wont work when it is supposed too. Everyhting is correct.

local playerDied = game.ReplicatedStorage.Events:FindFirstChild("Player_Died");
		print("playerDied", playerDied, typeof(playerDied), playerDied.ClassName)

		playerDied:InvokeServer() --request to be respawned.
		

server:

local function playerDied(plr)
	print(plr.Name .. " has died!")
	return true
end

	local playerDied = Events["Player_Died"]; --each time a player has died.
	
	playerDied.OnServerInvoke = playerDied;

Trying doing print(playerDied.InvokeServer), it should yield some sort of function.

  13:36:49.563  playerDied Player_Died Instance RemoteFunction function: 0x1d54c7e7cffaf7cb  -  Client - MAIN:44
  13:36:49.564  Expected ':' not '.' calling member function InvokeServer  -  Client - MAIN:46
  13:36:49.564  Stack Begin  -  Studio
  13:36:49.564  Script 'Players.billybobtijoseph.PlayerGui.Septance_GUI.MAIN', Line 46  -  Studio - MAIN:46
  13:36:49.564  Stack End  -  Studio

You literally have playerDied set to a function and remote function on the server. Choose two separate names.

that’s stupid af it should still work but ok,

preeeeesh

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