#How should I be learning scripting?
1 messages · Page 1 of 1 (latest)
im using the documentation
if thats what ur saying
Description
🎬 Edited by Me — I’d love your feedback, drop your thoughts in the comments!
📦 Resources & Links:
🛒 My Roblox Studio Shop ➜ https://buymeacoffee.com/sir8baller
✅ Subscribe for more ➜ https://www.youtube.com/@Sir8Baller
🎱 Roblox Profile ➜ https://www.roblox.com/users/908264161/profile
🔔 Don’t forget to ...
i want to make something cool like this
when i ask for help just because i forget that i made a small little error like
')'
they say im copying
@buoyant tendon pyro
i want to better understand modules
can i use remotevents along with modules?
Documentation is kinda eh, i recommend experimenting with things you learn in tutorials, like if you learn how to move a part, try to move it in a certain way, if you learn how to color objects, try to make a rainbow object, just experiment with things.
what do you mean by that
I want to make a dialogue system
It rlly bringed me down
K
a
but like, how do you want to use the remotevent and modules?
if you're fine with reading (and or learn well with reading) use the documentation: http://wiki.roblox.com/
if you prefer video tutorials then check these out: https://www.youtube.com/watch?v=BkYwRdCukZA&list=PLhieaQmOk7nIfMZ1UmvKGPrwuwQVwAvFa
https://www.youtube.com/watch?v=UoVYIZYKPOI&list=PLhieaQmOk7nIoGnFoACf33M3o0BOqB38a
saw them in a dialogue script
for mouse button down
i think
can i use mousebuttondown for input
I mostly use UserInputService
Like Input.UserInputService == Enum.UserInputService.Mousetype
Like mousebutton1
lets say, you have a client script, and the client is called "Sylis", and you want to tell the server that the client got a coin or something, you would do it like this,
-- Client Script
local RemoteEvent = game.ReplicatedStorage.RemoteEvent
RemoteEvent:FireServer("Got a Coin") -- This tells the server, what player fired this remote event, and the args, in this case: "Got a Coin"
-- Server Script
local RemoteEvent = game.ReplicatedStorage.RemoteEvent
RemoteEvent.OnServerEvent:Connect(function(Player, Args)
print(Player, Args) -- Prints "Sylis Got a Coin"
end)
you can use this to relay any information you want.
also a thing you can do with functions,
local function ShowCase(Something, Something2, ...)
print(Something,Something2, ...)
end
ShowCase("A", "b", "C", "D4") -- will print A b {"C", "D4"}
local function ShowCaseTwo(Something, Something2, ...)
local Something3, Something4 = table.unpack(...)
print(Something1, Something2, Something3, Something4)
end
ShowCaseTwo("A" "b" "CDDD" "Y") -- will print A b CDDD Y
-- "..." is basically a list that stores everything else.
Oh
so it tells the player
k
if you do Event:FireServer(args) it gives the server the player and the args
lemme check
when i press the button to end the dialogue system
someone said to use modules as it's cleaner
what is table.unpack
so
lets say you have a list which you know will have 3 values, and you want to unpack those values into variables, you would do it like this
local Var1, Var2, Var3 = table.unpack({"A","B","C"})
print(Var1, Var2, Var3) -- A B C
you can also add as many variables, even if the table doesnt have that much, BUT you do need to check if the variable == nil because it can mess up things
local Var1, Var2, Var3, Var4, Var5 = table.unpack({"A", "B"})
print(Var1, Var2, Var3, Var4, Var5) -- A B nil nil nil
yeah id use modules for this
k
store the text and the num value in them, and then write the text from them, so you can easily edit the text