iOwn_You
|
  |
| Joined: 21 Dec 2012 |
| Total Posts: 599 |
|
|
| 09 Jan 2017 12:13 PM |
where is the best place to store my remote events?
|
|
|
| Report Abuse |
|
|
DylWithlt
|
  |
| Joined: 30 Apr 2008 |
| Total Posts: 300 |
|
|
| 09 Jan 2017 12:14 PM |
I like replicated storage personally.
|
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 09 Jan 2017 12:37 PM |
replicated storage 95% of the time
|
|
|
| Report Abuse |
|
|
iOwn_You
|
  |
| Joined: 21 Dec 2012 |
| Total Posts: 599 |
|
|
| 09 Jan 2017 12:39 PM |
It's a server event? does it matter? It seems like it's running from workspace but not from ReplicatedStorage :s
|
|
|
| Report Abuse |
|
|
DylWithlt
|
  |
| Joined: 30 Apr 2008 |
| Total Posts: 300 |
|
|
| 09 Jan 2017 12:41 PM |
If you're using remote events for the sake of FilteringEnabled then replicated storage is the best place because it gets replicated to the server and the client so you can reference from both.
|
|
|
| Report Abuse |
|
|
iOwn_You
|
  |
| Joined: 21 Dec 2012 |
| Total Posts: 599 |
|
|
| 09 Jan 2017 12:42 PM |
Yeah, I am using it for FE, thing is it doesnt run, does both the remote event and the OnServerEvent script need to be in repstorage? or just the remote events itself? where should I put the script?
|
|
|
| Report Abuse |
|
|
DylWithlt
|
  |
| Joined: 30 Apr 2008 |
| Total Posts: 300 |
|
|
| 09 Jan 2017 12:44 PM |
Script goes wherever you want, local script goes wherever you want. At the beginning of either script do something like local re = game.ReplicatedStorage.RemoteEvent
then you can do this
re.OnServerEvent:connect(function(plr,args)
end)
or
re.OnClientEvent:connect(function(args)
end)
or even
re:FireServer()
or
re:FireClient()
|
|
|
| Report Abuse |
|
|
|
| 09 Jan 2017 12:46 PM |
I'm pretty sure the standard for tools are:
Tool¬ | Script+ LocalScript+ ModuleScript+ RemoteEvent+ RemoteFunction+ (optional if a return is needed) Handle¬ | Mesh (optional) (other tings like guis)
Want to be supported by developers in a positive atmosphere? Then join Studio BSD: https://www.roblox.com/My/Groups.aspx?gid=1013064 |
|
|
| Report Abuse |
|
|
iOwn_You
|
  |
| Joined: 21 Dec 2012 |
| Total Posts: 599 |
|
|
| 09 Jan 2017 12:49 PM |
output after a while that the event doesnt work:
Remote event invocation queue exhausted for ReplicatedStorage.RemoteEvents.AddSubScore; did you forget to implement OnServerEvent?
|
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
| |
|
DylWithlt
|
  |
| Joined: 30 Apr 2008 |
| Total Posts: 300 |
|
| |
|
iOwn_You
|
  |
| Joined: 21 Dec 2012 |
| Total Posts: 599 |
|
| |
|
iOwn_You
|
  |
| Joined: 21 Dec 2012 |
| Total Posts: 599 |
|
|
| 09 Jan 2017 01:02 PM |
Again I mention it works just fine when it's stored in workspace, What am I doing wrong? ;c
|
|
|
| Report Abuse |
|
|
DylWithlt
|
  |
| Joined: 30 Apr 2008 |
| Total Posts: 300 |
|
|
| 09 Jan 2017 01:04 PM |
| Why do you do a ############## after it, is there another remote event inside it? |
|
|
| Report Abuse |
|
|
DylWithlt
|
  |
| Joined: 30 Apr 2008 |
| Total Posts: 300 |
|
|
| 09 Jan 2017 01:04 PM |
| ###################################### |
|
|
| Report Abuse |
|
|
DylWithlt
|
  |
| Joined: 30 Apr 2008 |
| Total Posts: 300 |
|
|
| 09 Jan 2017 01:05 PM |
Add Sub Score keeps getting censored
|
|
|
| Report Abuse |
|
|
iOwn_You
|
  |
| Joined: 21 Dec 2012 |
| Total Posts: 599 |
|
|
| 09 Jan 2017 01:06 PM |
The Add Sub Score is inside the if statement determines if u should get score, if true it fires it;
if v.Tapped.Value then addsub:FireServer(reward); else addsub:FireServer(miss); print("false"); end
|
|
|
| Report Abuse |
|
|
DylWithlt
|
  |
| Joined: 30 Apr 2008 |
| Total Posts: 300 |
|
|
| 09 Jan 2017 01:07 PM |
Is it a remote event though?
|
|
|
| Report Abuse |
|
|
iOwn_You
|
  |
| Joined: 21 Dec 2012 |
| Total Posts: 599 |
|
|
| 09 Jan 2017 01:08 PM |
this part is in the client script, not the server
|
|
|
| Report Abuse |
|
|
iOwn_You
|
  |
| Joined: 21 Dec 2012 |
| Total Posts: 599 |
|
|
| 09 Jan 2017 01:08 PM |
it's firing the remote event it's not the remote event itself
|
|
|
| Report Abuse |
|
|
DylWithlt
|
  |
| Joined: 30 Apr 2008 |
| Total Posts: 300 |
|
|
| 09 Jan 2017 01:11 PM |
Thats not how remote events work.
|
|
|
| Report Abuse |
|
|
iOwn_You
|
  |
| Joined: 21 Dec 2012 |
| Total Posts: 599 |
|
|
| 09 Jan 2017 01:12 PM |
What do you mean? What am I doing wrong then? Cause in Workspace it's working just fine
|
|
|
| Report Abuse |
|
|
iOwn_You
|
  |
| Joined: 21 Dec 2012 |
| Total Posts: 599 |
|
| |
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 09 Jan 2017 05:55 PM |
| --server script local Events = game.ReplicatedStorage:WaitForChild('RemoteEvents') local ########### = Events:WaitForChild('AddSubScore') local Stats = game.ServerStorage:WaitForChild('Leaderstats') AddSubScore.OnServerEvent:connect(function(Player,Score) local SongScore = Stats[Player.Name].SongScore SongScore.Value = SongScore.Value + Score end) --local scipt local Events = game.ReplicatedStorage:WaitForChild('RemoteEvents') local ########### = Events:WaitForChild('AddSubScore') AddSubScore:FireServer(SongScore) |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 09 Jan 2017 05:56 PM |
--server script
local Events = game.ReplicatedStorage:WaitForChild('RemoteEvents') local AddSub Score = Events:WaitForChild('AddSub Score') local Stats = game.ServerStorage:WaitForChild('Leaderstats')
AddSubScore.OnServerEvent:connect(function(Player,Score) local SongScore = Stats[Player.Name].SongScore SongScore.Value = SongScore.Value + Score end)
--local scipt
local Events = game.ReplicatedStorage:WaitForChild('RemoteEvents') local AddSub Score = Events:WaitForChild('AddSub Score') AddSubScore:FireServer(SongScore)
|
|
|
| Report Abuse |
|
|