Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Clickdetector to operate a RemoteEvent FireServer?

Asked by 6 years ago
Edited 6 years ago

Greetings,

Is it possible to have a click detector function a FireServer()

Because need to have some animations with a Motor Desire Angle, It works on a tool but would like to have it as a button

Regards, If its even possible?

01plane = script.Plane.Value
02 
03wait(3)
04script.EngineThudIgnitor:Play()
05script.Parent.Parent.Parent.Switch.CockpitDisplays.Display3.Main.EngineStats.MessageBpx.Startvalue1.Visible = true
06script.Parent.Parent.Parent.Switch.CockpitDisplays.Display3.Main.EGT1.TrottleBox.Visible = true
07script.Parent.Parent.Parent.Switch.CockpitDisplays.Display3.Main.EGT1.ValueText.Visible = true
08wait(3.5)
09    plane.Parent.Engine_Start1:FireClient()
10end
0
it is possible. TheluaBanana 946 — 6y
0
Can't fireserver from server script. Only local scripts can do that. ErtyPL 129 — 3y

1 answer

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

it is possible to get a player from a clickdetector(ish). so with that we can(should be able to) FireServer() from a clickdetector:

1local click_detector = -- your click detetcor
2local remote_event = -- your remote event
3 
4click_detector.MouseClick:connect(function(player)
5    remote_event:FireClient(player)
6end)
0
I need to use it as a toggle switch for the engine fans to operate as a Filter Enabled capacity. S0NIC_Dev 61 — 6y
0
cant you use bindable events? the8bitdude11 358 — 6y
0
ok but i didnt getwhat u meant can u elaborate TheluaBanana 946 — 6y
0
When a player clicks the switch on the engine, I need the Motor to be compatible for the Filtering Enable for other players to see the motion/Animations S0NIC_Dev 61 — 6y
View all comments (2 more)
0
but cant u do that already? TheluaBanana 946 — 6y
0
ok whatever. fine TheluaBanana 946 — 6y
Ad

Answer this question