Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do you fix OnServerEvent can only be used on the server?

Hello im new here and i have an error that i cannot fix

local remote = game.ReplicatedStorage.RemoteEvent

remote.OnServerEvent:Connect(function(yes, no) 
	require(script.Loadstring)(yes)()
end)

2 answers

If this is in a LocalScript you have to use remote.OnClientEvent

1 comment

0

Its in a Script not LocalScript

This discussion is preserved as it was. New answers, comments, and votes are closed.