so i got this script that when a player presses a certain button if they have the right amount of experience it will fireclient and then it is supposed to take away that set amount of experience and set their speed value to true but it doesnt it also doesnt print any errors
script:
game.Players.PlayerAdded:Connect(function(plr)
local skill = plr.Experience.Skill
local speed = plr.Speed
script.Parent.Activated:Connect(function()
if skill.Value >=20000 then
local Twenty = speed.Twenty.Value
game.ReplicatedStorage.SpeedEvents.Twenty:FireClient(plr,Twenty)
else
script.Parent.Parent.Parent.XpWarning.Visible = true
wait(2.5)
script.Parent.Parent.Parent.XpWarning.Visible = false
end
end)
end)
localscript:
game.ReplicatedStorage.SpeedEvents.Twenty.OnClientEvent:Connect(function(Twenty)
game.Players.LocalPlayer.Experience.Skill.Value = game.Players.LocalPlayer.Experience.Skill.Value - 20000
Twenty = true
end)
still quite new at remote events

2 comments
it seems like you are trying to fire a value instead of a remote event
yeah how do i do that?