Hello So I’m running into this issue, this code doesn’t run at all:
local Event = game.ReplicatedStorage.RemoteFunctionName
local function asked(player)
print(player.Name .. "Send The Remote")
end
Event.OnServerEvent = asked
I also tried
local Event = game.ReplicatedStorage.RemoteFunctionName
local function asked(player)
print(player.Name .. "Send The Remote")
end
Event.OnServerEvent = asked()
Check your Output for any messages, we can’t really get much info from what your issue is apart from assuming a couple of things:
Output specifically relevant to your 2 lines of Codes (Server & Client)
If the Scripts you’re using aren’t Disabled/are properly working
If you properly defined & put the RemoteFunction in the correct spot
The first one should work though:
local RS = game:GetService("ReplicatedStorage")
local Event = RS:WaitForChild("RemoteFunctionName")
local function asked(player)
print(player.Name .. "Send The Remote")
end
Event.OnServerEvent = asked
local Event = game.ReplicatedStorage.RemoteFunctionName
local function asked(player)
print(player.Name .. "Send The Remote")
end
Event.OnServerEvent:Connect(asked)