|
| 31 May 2017 07:14 PM |
script 1: Regular Script -- in workspace ------------------------------------------------------------ local Event = game.ReplicatedStorage.PartCount
function fier() Event:FireClient() print('Fired') end workspace.Parts.ChildAdded:connect(fier) workspace.Parts.ChildRemoved:connect(fier)
script 2: local Script -- in textlabel in startergui ------------------------------------------------------------ local Event = game.ReplicatedStorage.PartCount
local function Change() local Amount = workspace.Parts:GetChildren() script.Parent.Text = "Current Part Cout: "..(#Amount) end
Change() Event.OnServerEvent:connect(Event)
Im using a Remote Event; Shoud I change?
Output: ------------------------------------------------------------ 17:13:30.473 - Attempt to connect failed: Passed value is not a function 17:13:30.474 - Stack Begin 17:13:30.475 - Script 'Players.Player1.PlayerGui.ScreenGui.PartCount.LocalScript', Line 10 17:13:30.475 - Stack End
This siggy is classified | R$306 |
|
|
| Report Abuse |
|
|
| |
|
|
| 31 May 2017 07:41 PM |
where xd
This siggy is classified | R$306 |
|
|
| Report Abuse |
|
|
|
| 31 May 2017 07:44 PM |
| Event.OnServerEvent:connect(Change) |
|
|
| Report Abuse |
|
|
helperobc
|
  |
| Joined: 04 Sep 2012 |
| Total Posts: 231 |
|
|
| 31 May 2017 07:45 PM |
What he is saying is don't use (Event) but insted (change) to transmit info
so it looks like this:
Event.OnServerEvent:connect(Change)
also consider having change return something back otherwise the script in workspace/serverstorage is useless.
|
|
|
| Report Abuse |
|
|