Hey there, I am trying to send a variable called "PLK" from a localscript to a server script. Currently in Experimental mode, _G is working, however when filtering is enabled, this no longer works for client to server communication. How can I send the variable over?
script.Parent.BREAKFAST.MouseButton1Click:connect(function()
local breakfastevent = script.Parent:WaitForChild("Value").Value:WaitForChild("breakfastEvent")
_G.plk = String.Value
breakfastevent:FireServer()
end)
Local Script^
breakfast.OnServerEvent:connect(function()
local Target = _G.plk
local meals = game.Players:WaitForChild(Target, 15):WaitForChild("MEALS")
local player = game.Players:WaitForChild(Target)
if meals.Breakfast.Waffles.Value == true then
local waffles = game.ServerStorage:WaitForChild("WaffleBreakfast"):Clone()
waffles.Parent = player.Backpack
elseif meals.Breakfast.Bacon.Value == true then
local bacon = game.ServerStorage:WaitForChild("BaconEggBreakfast"):Clone()
bacon.Parent = player.Backpack
elseif meals.Breakfast.Omlette == true then
local omlette = game.ServerStorage:WaitForChild("OmletteBreakfast"):Clone()
omlette.Parent = player.Backpackwww
end
end)
Server Script^
(This is eventually going to be used to serve food in a restaurant)

1 comment
Still need help with this!