Why doesn't this remote event work? No error in the output.
I want to make a RemoteEvent
which will reset the player's Stage
stats to 1. This however is not working. So I made a ScreenGui
and used a RemoteEvent
and picked up that event in a serverScript. No errors in the output have shown.
Local Script
1 | local button = script.Parent.Button |
3 | button.MouseButton 1 Click:Connect( function () |
4 | game.ReplicatedStorage.SettingsEvents.ResetStats:FireServer(game.Players.LocalPlayer.leaderstats.Stage.Value) |
5 | print ( "Button clicked ree." ) |
Server Script
1 | local rE = game:GetService( "ReplicatedStorage" ) |
2 | local setEvents = rE.SettingsEvents |
4 | setEvents.ResetStats.OnClientEvent:Connect( function (plr,StageVal) |
5 | print (plr.Name.. " set off the reset stats event." ) |
6 | plr.leaderstats.Stage.Value = 1 |
Thanks for taking your time. Any answers are appreciated.