generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Click detector issue

Previous Thread :: Next Thread 
247_Alpha is online. 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
SquidyBroh is not online. SquidyBroh
Joined: 08 Jul 2015
Total Posts: 221
11 Jul 2017 11:46 AM
Try creating event manually. Local may execute before server which would error.
Report Abuse
247_Alpha is online. 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 is online. 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 is online. 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 is online. 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 is not online. 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 is online. 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 is online. 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
BUNNYplog is not online. BUNNYplog
Joined: 06 Jul 2014
Total Posts: 2
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 is not online. 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 is online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image