StoryModule | Module for roblox's stories

Half Update Done
Now, when you stop the timer you can add a callback, using BreakTimer(function() print('callback!') end)
I’ll add it into documentation tomorrow.

If you still haven’t seen documentation yet, click on the top image, or click here: documentation

Yes this is exactly what I meant, sorry for being unclear.

1 Like

Hey! While reading this I found an error.

Coutdown(Number,Callback)

2 Likes

Is the video example you provided in the module? If not, please could you send me a file with it on. Thank you!

DEVFORUM CATEGORY UPDATED:
I added a TODO: Creating list in the category, so you will know what I am doing.

May I ask:

  • Why are the teleport function in lowercase but the others are in Pascal Case?

From the ModuleScript StoryModule

  • Why not not cancelled instead of cancelled == false? Why not ReplicatedStorage.StoryModuleRemotes instead of ReplicatedStorage["StoryModuleRemotes"]?
function story.Countdown(secs,callback)
	canceled = false
	game.ReplicatedStorage["StoryModuleRemotes"].startCount:FireAllClients(secs)
	wait(secs)
	if canceled == false then
		callback()
	end
end

And why not game:GetService("ReplicatedStorage") instead of game.ReplicatedStorage?

From StartGui/MainGui/Current

a.startCount.OnClientEvent:Connect(function(secs)
	script.Canceled.Value = false
	local t = secs
	
	script.Parent.Countdown.Visible = true
	script.Parent.Countdown.Count.Text = tostring(t)
	
	while wait(1) do
		if script.Canceled.Value == true then
			
			script.Parent.Countdown.Visible = false
			break
			
		else
			t -= 1
			script.Parent.Countdown.Count.Text = tostring(t)
			if t <= 0 then
				script.Parent.Countdown.Visible = false
				break
				
			end
		end
		
	end
	
end)

First, why tostring on a number as numbers and strings are automatically converted when doing mostly anything with them?
Secondly, why not for loops?
Thridly why not set the CountdownValue.Visible to false after the for loop as it looks like both break have it.

function show(fr)
	local fade = tweenService:Create(fr, TweenInfo.new(0.4,Enum.EasingStyle.Cubic), {Size = fr.Size, Position = UDim2.new(0.5, 0,0.15, 0)})
	fade:Play()
	wait(fade.TweenInfo.Time)
end

function hide(fr)
	local fade = tweenService:Create(fr, TweenInfo.new(0.4,Enum.EasingStyle.Cubic), {Size = fr.Size, Position = UDim2.new(0.5, 0,-1, 0)})
	fade:Play()
	wait(fade.TweenInfo.Time)
end

Why wait instead of fade.Completed:Wait()?


I noticed you’re using wait, you should avoid using them

Maybe a grammar error while coding, now I want to leave like that.

I script like this from my start, I only do that in some cases. Changed for the next update.

It does the same, so I didn’t changed that.

The next update I changed that because I found it… Just wait to update.

The video example is provided in the first post.

Oof, I do not see it? Filler Text.

Search for this text, and you will have a hided section called “Video Example”

I think you misunderstood me. I was wondering if the video example you provided was a file you could give me.

Yes, you can download it. I don’t care.

[ UPDATE NOTIFICATION ]

Update coming in some days!

Including:

  • Polls
  • Set Time
  • Set Sound
  • Extras!

Did you used the module?
Send me a video of what you did with it!

Thank you for your time!

Happy X-MAS

1 Like

Great job, might use this when a story game comes up.

Information:
I got punished. I will continue working on this in some days.
Thank you!

My website SSL got expired.
Im getting a new one!

Keep up the good work LuaAlbi. I might use it for one of my games, and credit you. Once it has better features, 100% sure I will use it.

1 Like

Next update very soon!

Adding:

  1. Pay-to-respawn | :robux_light:
  2. Polls | :chart_with_upwards_trend:
  3. Set Time / Set Sound | :hourglass: :musical_note:
  4. Minor Bug Fixes and Spelling Errors | :hammer_and_wrench:
  5. Transitions | :eyes:

How about doing dialogue for only specific players, and making it compatible with localscripts

Good one! Adding to update.

Update Info

The maximum time that it may take will be 3 days for the full update.

Thank you for your patience!

1 Like