RemoteEvent not working properly

I’ve been trying to code something, and inside it i had to include a RemoteEvent, but it seems like it working properly know why?

– Client

PurchaseEvent.OnClientEvent:Connect(function(plr, Transparency, CanCollide)
	Part.Transparency = Transparency
	Part.CanCollide = CanCollide
end)

– Server

mps.PromptGamePassPurchaseFinished:Connect(function(plr, purchaseID, Succes)
	
	if purchaseID == ID and Succes == true then
		PurchaseEvent:FireClient(0.5, false)
	end
	
end)
1 Like

https://developer.roblox.com/en-us/api-reference/class/RemoteEvent

You should pass the player as first parameter to let FireClient() know which client the RemoteEvent should fire to. Also, the player is not implicitly passed as an argument when OnClientEvent is fired.

PurchaseEvent.OnClientEvent:Connect(function(Transparency, CanCollide)
PurchaseEvent:FireClient(plr, 0.5, false)
2 Likes