gmatch
|
  |
| Joined: 21 May 2014 |
| Total Posts: 1173 |
|
|
| 03 Dec 2017 12:08 PM |
-- Script local ss = game:GetService("ServerStorage") local event = game:GetService("ReplicatedStorage"):WaitForChild("RemoteEvent")
game.Players.PlayerAdded:connect(function(player) local folder = Instance.new("Folder") folder.Name = player.Name folder.Parent = ss folder.ChildAdded:connect(function(object) print(object.Name) local asset = game:GetService("ReplicatedStorage").Parts:FindFirstChild(object.Name) if asset then event:FireClient(player, object.Name, 10) end end) end)
-- Local script
local event = game:GetService("ReplicatedStorage"):WaitForChild("RemoteEvent") local frame = script.Parent.Frame
event.OnClientEvent:connect(function(player, object, amount) print(player, object, amount) end)
Why does the "amount" return nil?
|
|
|
| Report Abuse |
|
|
gmatch
|
  |
| Joined: 21 May 2014 |
| Total Posts: 1173 |
|
| |
|
gmatch
|
  |
| Joined: 21 May 2014 |
| Total Posts: 1173 |
|
| |
|
libpng
|
  |
| Joined: 03 Sep 2017 |
| Total Posts: 20 |
|
|
| 03 Dec 2017 08:54 PM |
| event.OnClientEvent:connect(function(object, amount) |
|
|
| Report Abuse |
|
|
| |
|
Exzeption
|
  |
| Joined: 01 Nov 2011 |
| Total Posts: 1312 |
|
|
| 03 Dec 2017 08:58 PM |
| .OnClientEvent doesn't give player. You only need that for :FireClient |
|
|
| Report Abuse |
|
|
gmatch
|
  |
| Joined: 21 May 2014 |
| Total Posts: 1173 |
|
|
| 03 Dec 2017 09:10 PM |
Holy.. I'm stupid. Took me a day to figure that out. Thanks ex
|
|
|
| Report Abuse |
|
|