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

Any ideas why this remoteevent setup isn't work?

Hi guys! Any ideas why this remoteevent setup isn't working?

Local script in a textbutton:

script.Parent.MouseButton1Down:connect(function()
        value = "TestName"
	game.ReplicatedStorage.RemoteEvents.ChangeValue:FireServer("GameGenre",  value)
       print("Fired.")
end)

Server script in replicated storage in a folder called RemoteEvents:

script.Parent.OnServerEvent:connect(function(player, name, val)
	print("Recieved.")
end)

I was doing this for testing purposes (hence why I do nothing in the server script apart from print!!) but it doesn't even print. I get no errors and yet it prints "Fired.")

Any ideas?

Thanks.

1 answer

Scripts don't work in ReplicatedStorage

Nothing works in storage. Move the Script to ServerScriptService, and re-name the event in the Server Script.

2 comments

0

Thank you very much! That is odd though because I have other scripts that work perfectly in ReplicatedStorage!

0

Other than Module Scripts, scripts don't work in ReplicatedStorage nor ServerStorage.

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