#Making clouds bounce and learning tweenservice
1524 messages · Page 2 of 2 (latest)
the parent of that script is Smoke
to the script
and workplace is the parent of smoke
yes
and os on
so on
until no Parent
moving on
back to soundFire
wait
did you redefine the local sound
Yes
ok
now
function
you passed info
from part 1
to part 2
now part 2 knows what sound you want to play
yes
sound:Play ()?
explain yourself
why space
why you want to seperate them man
what did they do
to you
😭
hopefully
NO MEN
SoundObject:Play()
YES
OK
ok ill send a clip
** You are now Level 8! **
gimmie a sec
well
one sec
sent in wmv
@sterile crater It works!!!!!
that was the wrong clip!!!
@crisp raft are you ready?
before the next sound
aka cooldown
what is debounce
COOLDOWN
how does that work
you say
no cooldown
you toucjh
you give cooldown
you wait
you say no morec ooldown
you can touch
nonono
this
local deb = false
while wait() do
if not deb then
deb = true
-- stuff
wait(1)
deb = false
end
end
doesn't make sense
task.wait will simply wait the specified amount of time and after that continue the code
go further down
to the user Cairo
his explanation is readable
ok
local Debounce = false
local DelayTime = 0.5
now i need to make Debounce trigger
local Debounce = false -- Our Debounce Variable
local DelayTime = 1 -- Our Delay time
function DebounceExample ()
if not Debounce then -- Checks if the Debounce is not equal to true (I believe)
Debounce = true -- Enables the Delay, function cant be used until false
print("Debounce Enabled")
task.wait(DelayTime) -- Wait time for delay
print("Debounce Disabled")
Debounce = false -- Disables Delay, Function can be used again
end
end
while task.wait(Delaytime) do -- Example of a Debounce in a loop
DebounceExample()
end
So if not Debounce then at the start
basically
local onCooldown = false
--// you touch part
onCooldown = true
task.wait(5)
onCooldown = false
yes
local Remote = game:GetService("ReplicatedStorage"):WaitForChild("SoundPlayEvent")
local Sound = game.ReplicatedStorage.Sounds.BoingSound
local Debounce = false
local DelayTime = 0.5
function SoundFire(SoundName, SoundObject)
if not Debounce then
print(SoundName, SoundObject)
SoundObject:Play()
Debounce = true
task.wait(0.5)
Debounce = false
end
Remote.OnClientEvent:Connect(SoundFire)
also
i have a new error
i didn't change
SoundFire so i don't understand
the error
Pynman
did you close the if statement with an end
and fix the indentation
if not Debounce then
print(SoundName, SoundObject)
in the same line level
just brings a tear to my eye
the end part
if not debounce then
anything
the rest of the script
write me a simple statement
which mentions that
if 1+1 = 2
then you print("Hi")
local a = 7
local result = 7 + 4
local function addSevenAnd4
local result = 7 + 4
if not Debounce then
print(result)
end
;compile
/opt/wandbox/lua-5.4.3/bin/lua: prog.lua:5: '(' expected near 'local'
;compile
/opt/wandbox/lua-5.4.3/bin/lua: prog.lua:5: '(' expected near 'local'
what
local a = 7
while true do
wait(2)
for a=7,10 do
print(a) -- prints 10 times!)
end
-- addition
local function addThreeAndFour()
local result = 3 + 4
print(result)
end
-- calling the function with no return
addThreeAndFour() -- 3
print(a)
print(5+a)
print(a+203+103)
;compile
/opt/wandbox/lua-5.4.3/bin/lua: prog.lua:19: 'end' expected (to close 'while' at line 2) near <eof>
ok
i don't get it
i made those
a while ago
only then
when learning print
local a = 1
local function math()
local result = 1 + 1
print(result)
end
;compile
ok
YOU MADE THE FUNCTIOn
BUT DIDNT CALL THE FUNCTIOn
MAN
THIS FUNCTION IS FUNCTIONLESS
WITHOUT THE CALL
😭
CALL THE FUNCTION
OK
DIAL IT
local a = 1
local function mathskills()
local result = 1 + 1
print(result)
end
mathskills()
print(result)
;compile
2
nil
disappointed in your for the nil
but I'll let it slide
now
tell me
what is wrong here
if not Debounce then
print(SoundName, SoundObject)
one word
is missing
every statement
and function
has the same word
at the end of the code
which closes the statement
the function you mean?
local Remote = game:GetService("ReplicatedStorage"):WaitForChild("SoundPlayEvent")
local Sound = game.ReplicatedStorage.Sounds.BoingSound
local Debounce = false
local DelayTime = 0.5
function SoundFire(SoundName, SoundObject)
if not Debounce then end
print(SoundName, SoundObject)
SoundObject:Play()
Debounce = true
task.wait(0.5)
Debounce = false
end
Remote.OnClientEvent:Connect(SoundFire)
nono my friend
you made big oopsie
why is end at the start
you want to execute everything past then
theres already an end
local Remote = game:GetService("ReplicatedStorage"):WaitForChild("SoundPlayEvent")
local Sound = game.ReplicatedStorage.Sounds.BoingSound
local Debounce = false
local DelayTime = 0.5
function SoundFire(SoundName, SoundObject)
if not Debounce then
print(SoundName, SoundObject)
SoundObject:Play()
Debounce = true
task.wait(0.5)
Debounce = false
end
Remote.OnClientEvent:Connect(SoundFire)
end
NO MEEEN
now there is no error
we do this
local Debounce = false
if not Debounce then
print("HI")
Debounce = true
finish the code
local Remote = game:GetService("ReplicatedStorage"):WaitForChild("SoundPlayEvent")
local Sound = game.ReplicatedStorage.Sounds.BoingSound
local Debounce = false
local DelayTime = 0.5
function SoundFire(SoundName, SoundObject)
if not Debounce then
end
print(SoundName, SoundObject)
SoundObject:Play()
Debounce = true
task.wait(0.5)
Debounce = false
end
Remote.OnClientEvent:Connect(SoundFire)
this happens
if i
press enter
👀
after the if statement
;compile
/opt/wandbox/lua-5.4.3/bin/lua: prog.lua:1: attempt to index a nil value (global 'game')
stack traceback:
prog.lua:1: in main chunk
[C]: in ?
local Debounce = false
if not Debounce then
print("HI")
Debounce = true
end
yes
men
...
thats all you need
to close the statement
now
go back to the main code
and look
where you have to put the end
to close the if statement
local Remote = game:GetService("ReplicatedStorage"):WaitForChild("SoundPlayEvent")
local Sound = game.ReplicatedStorage.Sounds.BoingSound
local Debounce = false
local DelayTime = 0.5
function SoundFire(SoundName, SoundObject)
if not Debounce then
print(SoundName, SoundObject)
SoundObject:Play()
Debounce = true
task.wait(0.5)
Debounce = false
end
end
Remote.OnClientEvent:Connect(SoundFire)
THE IF STATEMENT IS THE FUNCTION
local Remote = game:GetService("ReplicatedStorage"):WaitForChild("SoundPlayEvent")
local Sound = game.ReplicatedStorage.Sounds.BoingSound
local Debounce = false
local DelayTime = 0.5
function SoundFire(SoundName, SoundObject)
if not Debounce then
print(SoundName, SoundObject)
SoundObject:Play()
Debounce = true
task.wait(0.5)
Debounce = false
end
end
Remote.OnClientEvent:Connect(SoundFire)
OH
gotta specify where things begin and where they end
this is called sytnax
syntax*
very fun stuff
I THINK I UNDERSTAND
absolutely torturing
while true do
end```
delay on sound
yes
You could do the same thing with the bounce pad script
with speed also
couldn't you?
just replace the values with movespeed
if you want to give them a quick speed boost yes
it would be a bit different though
.Jump wouldn't be mentioned
aka forcefully making them jump
but
now
@crisp raft
are you ready
ready for what
oh no
YES
can i get food first
I really want to make the game work
tweenservice docs
now
you probably wont understand majority of it
so
ill dum it down
since I'd say tweenservice doesn't really have a definition
it's just tweenservice
the closest thing I'd call it is an Animator?
there is an evil alternative I will need to stay away from
chat gpt knows luau...
I WILL NOT
FALL TO THE TEMPTATION
I WILL LEARN
animates everything
basically
here is what it does
you specify a lot of indo
info*
but
the main 3 things you specify
will this be in the first script
local Remote = game:GetService("ReplicatedStorage"):WaitForChild("SoundPlayEvent")
local pad = script.Parent
local Sound = game.ReplicatedStorage.Sounds.BoingSound
function jump(hit)
if hit.Parent:FindFirstChild("Humanoid") then
local humanoid = hit.Parent:FindFirstChild("Humanoid")
local player = game.Players:GetPlayerFromCharacter(humanoid.Parent)
Remote:FireClient(player,"Sound",Sound)
humanoid.JumpHeight = 100
humanoid.Jump = true
task.wait(.5)
humanoid.JumpHeight = 7.2
end
end
pad.Touched:Connect(jump)
this one
or just by the player
because of you want it to be seen by everyone we need to rework it completely
prob just the player because if everyone sees it there could be animation over lap
the audioplay script?
yh
uh sorry to interrupt, but radder the answer to my question in the post are module scripts?
nope
dang
module scripts make things more organised
but
- search up a tutorial on yt
for a simple fireball so you understand
the mechanics
of abilities
after that you should have somewhat of a clue on what to do
it's not that complicated
there's basically 2 big things involved and that's it
I mean the ability works perfectly fine and the cooldown works perfectly fine too. I want it to give a visible cooldown on a gui
and that's the problem
cause I try to somehow connect scs with startergui
you don't have to touch either one of them
wut
you haven't understood what either one of them are
whenever you launch the game right
ye
and your character gets created in game
I know
yes
same deal with startergui
99.99% of the time you don't mess with them
because they are the foundation
So how tf do I make it work
if you do it'll probably break the guis somehow
in your case
you're using a pre made module script
which is a pain

anyways
you just need to get into the LocalPlayer's PlayerGui and then into YourUi and update one of the element's text
simple stuff
, but since it's a module script
with stuff already going on in there
it's a bit harder
this is why using module scripts made by other people is a pain
you have to really understand what each line does
ok so @sterile crater I gotta go to town and stuff so ill prob be back on in a few hours idk if you will still be on so when i get more free time ill make a post on tween
WOW
thank you so much btw
im not
I hope it follows you in your nightmares

I SAID I WOULD BE BACK
nope
MAYBE EVEN TONIGHT IF I HAVE TIME
hope it haunts you
i will ping you when i make next post
👀
👍
bro
VFX is a painful part
it's a local script in scs
and that's it
works like a charm
I ain't using no module script
ok

- where is the value
is it in a script
is it an object
intValue stringValue e.t.c
in scs
in the module script?
No
Omg
ok
so listen again
in scs
there is a folder
in that folder there is a local script
ok
yeah I have allat
create textlabel inside of the screengui
yes
local cooldown = 0
local player = game.Players.LocalPlayer
player.PlayerGui:WaitForChild("YourGuiName").TextLabel.Text = tostring(cooldown)
that's literally it
1 line
of the same local script
inside
you use
the problem with this script is
you have to UPDATE THE VALUE
every single time it changes
ye
sio
you can do that in many ways
, but personally
I create a function
that is used every time the value changes
EXAMPLE:
so basically I tried doing that and when the script in scs changed the value in startergui the script in starter gui didn't want to see the change
local cooldown = 0
local player = game.Players.LocalPlayer
local function updateUI()
player.PlayerGui:WaitForChild("YourGuiName").TextLabel.Text = tostring(cooldown)
end
cooldown += 1
task.spawn(function()
repeat
cooldown -= task.wait()
updateUI()
task.wait()
until cooldown <= 0
end)
doing round base tutorial by roblox local RoundLengthInSeconds = 60 local IntermissionLengthInSeconds = 20 local RoundStartTime local function initialize() RoundStartTime = tick() end while true do initialize() repeat local currentTime = tick() local timeSinceGameStarted = currentTime - RoundStartTime game.StarterGui.Round.Frame.Tex...
there's many ways to do this
MANY
this does use a remote event
** You are now Level 6! **
no matter what