247_Alpha
|
  |
| Joined: 10 Oct 2010 |
| Total Posts: 39 |
|
|
| 11 Jul 2017 11:44 AM |
So after trying to learn how local scripts work i was sort of getting the hang of it. Until filtering enabled came out and now im trying to get logic off that anyway
The goal of this script is to change a parts transparency to 0 and make cancollide to false.
Local (On button)
local clickDec = script.Parent.ClickDetector clickDec.MouseClick:connect(function() game.ReplicatedStorage.Door.Doorevent:FireServer() print("attempted fire") end)
The print never seams to get out putted
Server listener
local event = Instance.new("RemoteEvent") event.Name = "Doorevent" event.Parent = game.Workspace event.OnServerEvent:Connect(function() game.workspace.Door.Transparency = 0 game.workspace.Door.CanCollide = false end)
Just nothing gets through when clicked
Was trying to learn off this http://wiki.roblox.com/index.php?title=Security
After this then i should be able to more complex tasks with this
|
|
|
| Report Abuse |
|
|
|
| 11 Jul 2017 11:46 AM |
| Try creating event manually. Local may execute before server which would error. |
|
|
| Report Abuse |
|
|
247_Alpha
|
  |
| Joined: 10 Oct 2010 |
| Total Posts: 39 |
|
|
| 11 Jul 2017 11:46 AM |
Now i noticed spelling errors kill me
|
|
|
| Report Abuse |
|
|
247_Alpha
|
  |
| Joined: 10 Oct 2010 |
| Total Posts: 39 |
|
|
| 11 Jul 2017 12:43 PM |
Ok the event is its own instance with this code
event.Name = "Doorevent" event.OnServerEvent:Connect(function() game.workspace.Door.Transparency = 0 game.workspace.Door.CanCollide = false end)
The "event" is triggering an error
W001: Unknown global 'event'
|
|
|
| Report Abuse |
|
|
247_Alpha
|
  |
| Joined: 10 Oct 2010 |
| Total Posts: 39 |
|
|
| 11 Jul 2017 12:47 PM |
Ok rebound the event but nothing is fireing itself
local event = script.parent
event.Name = "Doorevent" event.OnServerEvent:Connect(function() game.workspace.Door.Transparency = 0 game.workspace.Door.CanCollide = false end)
|
|
|
| Report Abuse |
|
|
247_Alpha
|
  |
| Joined: 10 Oct 2010 |
| Total Posts: 39 |
|
|
| 11 Jul 2017 12:49 PM |
It could be my very bad jargon on calling the remote fire but i uploaded the test place for anyone willing to help
https://www.roblox.com/games/911123236/FILTERING-test
|
|
|
| Report Abuse |
|
|
nullfeels
|
  |
| Joined: 31 Mar 2017 |
| Total Posts: 1215 |
|
|
| 11 Jul 2017 01:16 PM |
Try this:
local clickDec = script.Parent.ClickDetector clickDec.MouseClick:connect(function() game.ReplicatedStorage.Door.Doorevent:FireServer() print("attempted fire") end)
game.ReplicatedStorage.Door.Doorevent.OnServerEvent:Connect(function() game.workspace.Door.Transparency = 0 game.workspace.Door.CanCollide = false end) |
|
|
| Report Abuse |
|
|
247_Alpha
|
  |
| Joined: 10 Oct 2010 |
| Total Posts: 39 |
|
|
| 11 Jul 2017 02:42 PM |
I can see what you did but the local script just wont pass through its own coding but the remote call seams robust enough to work
|
|
|
| Report Abuse |
|
|
247_Alpha
|
  |
| Joined: 10 Oct 2010 |
| Total Posts: 39 |
|
|
| 11 Jul 2017 03:41 PM |
Im just going to recheck some studio settings some local scripts just don't want to run.
|
|
|
| Report Abuse |
|
|
|
| 11 Jul 2017 04:10 PM |
| I Don't Know what your taking about but what I did for a local is local Base = game.Workspace.Baseplate |
|
|
| Report Abuse |
|
|
Cyrakohl
|
  |
| Joined: 09 Nov 2014 |
| Total Posts: 3197 |
|
|
| 11 Jul 2017 04:16 PM |
People are so dumb
You cant use FireServer in a local script it's common sense.
|
|
|
| Report Abuse |
|
|
247_Alpha
|
  |
| Joined: 10 Oct 2010 |
| Total Posts: 39 |
|
|
| 11 Jul 2017 04:24 PM |
It came from the wiki and local scripts or the only thing that can detect your mouse and other keys. it makes sense for local scripts to fireserver
|
|
|
| Report Abuse |
|
|
nullfeels
|
  |
| Joined: 31 Mar 2017 |
| Total Posts: 1215 |
|
|
| 11 Jul 2017 04:30 PM |
"You cant use FireServer in a local script it's common sense."
Umm... Excuse me? I think you're confusing something... This is incorrect. |
|
|
| Report Abuse |
|
|
Cyrakohl
|
  |
| Joined: 09 Nov 2014 |
| Total Posts: 3197 |
|
|
| 11 Jul 2017 04:32 PM |
Try using fireServer in a local script then youll see
|
|
|
| Report Abuse |
|
|
nullfeels
|
  |
| Joined: 31 Mar 2017 |
| Total Posts: 1215 |
|
|
| 11 Jul 2017 04:44 PM |
| @Cyrakohl, I do, all the time, and so does everyone else... |
|
|
| Report Abuse |
|
|
nullfeels
|
  |
| Joined: 31 Mar 2017 |
| Total Posts: 1215 |
|
|
| 11 Jul 2017 04:45 PM |
| http://wiki.roblox.com/index.php?title=Remote_Events_and_Functions#Client_to_Server |
|
|
| Report Abuse |
|
|