im using a fire server to tell the game that a player has dropped an item in their inventory, but i dont know what im doing wrong (maybe its the RequestDrop:FireServer() or the local function onDropFired(player)
here it is:
Local Script:
local RequestDrop = script.Parent.RequestDrop player = game.Players.LocalPlayer script.Parent.MouseButton1Click:connect(function() print (player.Name,"wants to drop an item!") RequestDrop:FireServer() end)
Script:
local drop = game.ReplicatedStorage.stuff.wood.drop local clone = drop:Clone() local RequestDrop = script.Parent.RequestDrop local function onDropFired(player) print(player.Name, "has dropped an item") clone.Parent = game.Workspace clone.CFrame = CFrame.new(player.Character.HumanoidRootPart.Position) clone.Transparency = 0 clone.Anchored = false clone.CanCollide = true clone.Script.Disabled = false script.Parent:Destroy() end RequestDrop.OnServerEvent:Connect(onDropFired)
really new to this whole fire server thing, any help would be nice!