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

[RemoteEvent] Print the string?

Asked by 9 years ago

Making a local script execute for my admin commands.

The local print is returning " " or "nil".

_G.LER(Speaker,'asd') -- Main admin script (Server script)

_G.LER=(function(plr,scpname) -- Second child script (Server script)
    if script.Parent:FindFirstChild([[LocalExe]],true) then
        local Exe=script.Parent.LocalExe
        Exe.Name='RLE'
        Exe:FireClient(plr,scpname)
    end
end)

--==================================================--

wait() -- LocalPlayer (Client script) [Backpack]
function checkforscript()
    repeat 
    wait(.1)
    local SM=game:GetService('Workspace'):FindFirstChild('MilesAdminV2',true)
    SM:FindFirstChild('LocalExe',true)
    until 
    game.Workspace['MilesAdminV2']:FindFirstChild('LocalExe',true)
end

checkforscript()
workspace['MilesAdminV2'].LocalExe.OnClientEvent:connect(function(str,...)
    print(...) --- Why is this print returning nil or " "
end)

Answer this question