Variable wrongly printing as players username

“item” variable is printing as the players username in the server script

local

local Item = game.ReplicatedStorage.Placeables.landmine

local mouse = game.Players.LocalPlayer:GetMouse()

local player = game.Players.LocalPlayer

script.Parent.Equipped:Connect(function()
	local Place = Item:Clone()
	Place.Parent = workspace
	local main = Place.Main
	mouse.Move:Connect(function()
		main:PivotTo(CFrame.new(mouse.Hit.p)) 
	end)
	script.Parent.Unequipped:Connect(function()
		Place:Destroy()
	end)
	script.Parent.Activated:Connect(function()
		script.Parent.Place:FireServer(Item, mouse)
		--script.Parent:Destroy()
	end)
end)

server

script.Parent.Place.OnServerEvent:Connect(function(Item ,mouse)
	local PARTY = Item:Clone()
	print(Item.Name)         -----HERE ISSUE
	PARTY.Parent = workspace
	PARTY:PivotTo(CFrame.new(mouse.Position)) 
	
end)

RemoteEvent’s first argument is always player so it should look like this

script.Parent.Place.OnServerEvent:Connect(function(plr, Item

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