My remote event does not work for some reason. I get no errors.
When I click the button it does not do what I programmed it to do. Here is the code.
game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(plr)
local Frame = game.StarterGui.JumpCounter.Frame
Frame.Trail1.MouseButton1Click:Connect(function()
Frame.Visible = true
if game.Players.LocalPlayer.leaderstats.Jumps.Value >= 50 then
script.Parent.Parent.Frame.Trail1.Visible = true
else
script.Parent.Parent.Frame.Trail1.Visible = false
if game.Players.LocalPlayer.leaderstats.Jumps.Value >= 100 then
script.Parent.Parent.Frame.Trail1.Visible = true
script.Parent.Parent.Frame.Trail2.Visible = true
else
script.Parent.Parent.Frame.Trail1.Visible = false
script.Parent.Parent.Frame.Trail2.Visible = false
end
end
end)
end)
Code in the button:
script.Parent.MouseButton1Click:Connect(function(plr)
game.ReplicatedStorage.RemoteEvent:FireServer(plr)
end)

2 comments
Localplayer isn't a thing on a normal script. Don't need to pass in 'plr' in your local script since that's provided automatically. Don't think you can add events to stuff like StarterGui and expect it to affect the actual player.
DONT USE game.StarterGUI you need use player.PlayerGUI