Rebirth script not working

Still doesn’t work, even with MouseButton1Down.

I meant MouseButton1Click try that my apologies

I tried that aswell, doesn’t work.

Oh I did player instead of plr when defining you need to change that

still doesn’t work… tbh idk why, i should try and make another script

Can you show me your server script with the OnServerEvent

its

--Rebirth
game.ReplicatedStorage.Rebirth.OnServerEvent:connect(function(plr)
	plr.leaderstats.Rebirths.Value = plr.leaderstats.Rebirths.Value +1
	plr.leaderstats.Steps.Value = 0
	plr:LoadCharacter()
end)

Okay add plr into the FireServer from the local script

Your server script is looking for plr but not getting it that’s why

what do you mean by that? I already have it in

local plr = game.Players.LocalPlayer

local RS = game:GetService("ReplicatedStorage")

local function Rebirth()
	if plr.leaderstats.Rebirths.Value == 0 and plr.leaderstats.Steps.Value >= 10000 then
		RS.Events.Rebirth:FireServer()
	else
		if plr.leaderstats.Rebirths.Value >= 1 and plr.leaderstats.Steps.Value >= (plr.leaderstats.Rebirths.Value * 10000) + 10000 then
			RS.Events.Rebirth:FireServer()
		end
	end
end

script.Parent.MouseButton1Click:Connect(Rebirth)

The "local plr = game.Players.LocalPlayer

You need to put plr in it
like so RS.Events.Rebirth:FireServer(plr)

The first parameter of OnServerEvent will automatically pass the player, afterwards tuple arguments so it’s not necessary to do that, otherwise you’ll just be messing your order of arguments

I told him to do it on the client not Server

still didnt work, any other suggestions on what i should try? Or should I redo the script. [ make new gui and stuff aswell]

Also @LuaCoold where do you have the script parented to?

the script is parented to the button

local plr = game.Players.LocalPlayer

local RS = game:GetService("ReplicatedStorage")
print("Script running")

local function Rebirth()
    print("Button pressed")
	if plr.leaderstats.Rebirths.Value == 0 and plr.leaderstats.Steps.Value >= 10000 then
        print("Rebirthing for the first time")
		RS.Events.Rebirth:FireServer()
	elseif plr.leaderstats.Rebirths.Value >= 1 and plr.leaderstats.Steps.Value >= (plr.leaderstats.Rebirths.Value * 10000) + 10000 then
        print("Not your first time? Rebirth again!")
		RS.Events.Rebirth:FireServer()
	end
end

script.Parent.MouseButton1Click:Connect(Rebirth)

Could you try this and see what outputs?

That outputted, “Script running” but nothing else when i clicked it

Ok you’re either using the wrong event, or your object isn’t correct

What object is the button that you mentioned earlier? Just a regular TextButton?