#How do you make a variable that counts your jumps?
1 messages · Page 1 of 1 (latest)
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
local humanoid = character:WaitForChild("Humanoid")
local jumpCount = 0
humanoid.StateChanged:Connect(function(oldState, newState)
if newState == Enum.HumanoidStateType.Jumping then
jumpCount += 1
print(player.Name.." has jumped "..jumpCount.." times")
end
end)
end)
end)
try this. if you want you can go add a text label on the screen or sum. open your output to see if its working. a print will appear
print(player.Name.." has jumped "..jumpCount.." times")
if you see this its working
just add a ui and link it to the script
yw
im gonna learn ui later since im really new
its pretty simple
go to uh playergui i think
lemme open roblox studio
ill tell you how to do it
go to this
insert object. screengui
right click on the screengui when u add it and type textbox
a white box will appear on your screen
insert object in ur textbox and select textlabel
once you do that, go to properties of the textlabel and configure it
wait
** You are now Level 2! **
dont add a text label
just do the textbox itself
rename it to like jumps: (jumps counted)
then to get rid of the white box if you want
just configure the background transparency to 1
and put the script i putted inside the screen gui
and it should work
@hearty stag
if it dosent work just search a tutorial ig
wait no putting the script i putted inside the screengui it wont work
cuz the screengui is not mentioned in the script
if you wanna do that just learn scripting and do it
Didn't ask but ty
K
Be grateful he went out of his way to help you man
Real
U were not even supposed to be given a whole system lil tecca
I would have flanked the doc’s link on your face if I was the gentle guy who patiently helped carried you
Next time i catch acting like that, nothing will happen