Categories > Coding > Lua >
Legends Of Speed script
Replied
1. try to convert the mess that remote spy made
local args = {
[1] = "collectOrb",
[2] = "Red Orb",
[3] = "City"
}
game:GetService("ReplicatedStorage").rEvents.orbEvent:FireServer(unpack(args))
is the same thing as:
game:GetService("ReplicatedStorage").rEvents.orbEvent:FireServer("collectOrb", "Red Orb", "City")
which is much much shorter so please make sure to take the arguments in order and put them in the "unpack(args)" zone as it looks much cleaner
2. try to use task.wait() instead of wait()
3. dont use giant cframes, all it does is add a bit of exact rotation/position but when you tp we really dont need that:
game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(-564.712646, 3.20321131, 396.023041, -0.999465585, 0.0320054069, 0.00662442576, 0.0301679447, 0.981364131, -0.189774275, -0.0125747789, -0.189473093, -0.981805384)
you can just use a small, rounded up number:
game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(564, 3, 396)
4. make a variable for the local player and character so that you dont have to type most of that ^ code in when you just want to tp, instead it
would be as simple as: hrp.CFrame
other example of this ^ being useful:
game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = v
5. make sure to always have good formatting when making scripts open source because we are wayy too lazy to format it
Cancel
Post
Did I mention I use arch btw?
Replied
nice
keep the good work up and believe in your self :)
Cancel
Post
Languages - C++, C#,Javascript, HTML, CSS, Lua ,Xaml, Python
https://dsc.gg/hackerpluto
Users viewing this thread:
( Members: 0, Guests: 1, Total: 1 )
Cancel
Post