So i know when you are gonna use FireServer()
You can pass values to the server like
local value = "Blue"
local event = pathwaytoevent
event:FireServer(value)
and you can pass it right, but can you like pass a function? Lets say in the script above, our variable “value” is a function that changes the property of a brick, and when you pass the function to the server and from there you can do whatever you want from it.
example:
local value = function()
--do something
end
local event = pathwaytoevent
event:FireServer(value)
is that possible? how would you script that out (passing a function through the FireServer() parameters)
The reason I want to know this is so I can manage my main menu easier, my main menu uses camera manipulation (to make a cool background of the main menu) it anchors the player’s HumanoidRootPart so they can’t move around, and sets all the coreGUI to be non-visible. once they pick their team and whatnot, it will set their Camera to normal, Unanchors the HumanoidRootPart, and sets their CoreGUI back to normal. but you have to un-anchor the players HumanoidRootPart through the server, so thats why I’m wondering, so I can pass a function that sets their CoreGUI and camera to normal to the server, and also unanchor the HumanoidRootPart, here it is kinda scripted out so I can make more sense:
event.OnServerEvent:Connect(function(player,--function that i passed through the client that sets the players CoreGUI and camera to normal--)
--function
--un-anchor the player's HumanoidRootPart
player:LoadCharacter()
end)
Side Note: The event is gonna fire when the player clicks a GUI
I’m a bad explainer so if you want more information please say so