Use the pre-made DropHat RemoteEvent.
This commit is contained in:
parent
1333f4c427
commit
498eb67312
|
|
@ -6,9 +6,7 @@ local torso = char:WaitForChild("HumanoidRootPart")
|
||||||
local humanoid = char:WaitForChild("Humanoid")
|
local humanoid = char:WaitForChild("Humanoid")
|
||||||
local hatPickup = script:WaitForChild("HatPickup")
|
local hatPickup = script:WaitForChild("HatPickup")
|
||||||
|
|
||||||
local dropHat = Instance.new("RemoteEvent")
|
local dropHat = script:WaitForChild("DropHat")
|
||||||
dropHat.Name = "DropHat"
|
|
||||||
dropHat.Parent = script
|
|
||||||
|
|
||||||
local function onDropHat(player)
|
local function onDropHat(player)
|
||||||
local myPlayer = Players:GetPlayerFromCharacter(char)
|
local myPlayer = Players:GetPlayerFromCharacter(char)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue