Hi Daniel! That's awesome you're learning Lua for Roblox! Coding can be super fun. Since…
- User
Hi Daniel!
That's awesome you're learning Lua for Roblox! Coding can be super fun. Since you mentioned ERLC, maybe we can focus on making some simple scripts for a similar type of game? Avoid "skidding" – that's copying code, and it doesn't help you learn, and it's important to know that copying code is just not ok. We can break down everything about autism related to code and scripting. Do you want to try making a simple script to change your character's speed in ERLC?
- Assistant
Hi Daniel!
That sounds like a great idea! Changing your character's speed is a fun and practical way to start scripting in Roblox using Lua. Let me help you write a simple script that will increase or decrease your character’s walking speed when you run the game.
Here’s a simple example you can try:
lua-- This script changes the player's walk speed when they join the game game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) -- Wait for the Humanoid object, which controls movement local humanoid = character:WaitForChild("Humanoid") -- Change the walk speed humanoid.WalkSpeed = 30 -- Default is 16; try 30 to run faster end) end)