Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

No Up-To-Date API Notes, Help Please?

Asked by 5 years ago
Edited 5 years ago

Hey, I've been trying to learn how to script in Roblox Lua, which is by no means Python. It's rather hard to learn and I've been reading documentation and examples but whenever I find something, it ends up not working no matter what even if I follow the example step-by-step, or it ends up only covering how to name and write variables and other very simple tasks, or it involves branches that just don't exist anymore, i.e. Local.Player.

Can anyone give me up-to-date guides of the library? api.roblox is outdated and so is the wiki. Very stuck right now. Also while Lua is basically C with alterations since it's a C extension, I can't use most of my C knowledge, which is very limited, to use with Roblox.

To be more technical, I'll explain exactly what I was trying to do.

First, I tried making a leveling UI with support for a future perk system.

game.Players.PlayerAdded:Connect(function(Player)
    local Data = Instance.new(intvalue,Player)
    Data.Name = 'Data'
    local XP = instance.new(intvalue,Data)
    local PerkPoint = Instance.new(intvalue,Data)
    PerkPoint.Name = 'Perk Point'
    XP.name = 'Experience'
    local Level = instance.new(intvalue,Data)
    Level.Value = 1
    XP.Changed:Connect(function()XPChangingFunction(Player.XP,Level,PerkPoint)end)

end)

function XPChangingFunction(Player,XP,Level)
    if XP.Value (GREATER THAN) Level.Value * 150 then
        XP.Value = 0
        Level.Value = Level.Value + 1
        PerkPoint.Value = PerkPoint + 1
    end
end

is the first script. It's supposed to create a Data directory in the local player, but it doesn't.

Then I have a GUI with a script that goes like this:

>while true do
    wait()
    local XP = script.Parent.Parent.Parent.Parent.Parent.Data.Level.Value
        local MaxXP = script.Parent.Parent.Parent.Parent.Parent.Data.Level.Value * 150
            local Mathematics = (XP / MaxXP)
                script.Parent:TweenSize(UDIm2.new(Mathematics,0,1,0),'Out','Quad',25)
end> 

And I have a sneak script that goes way different and tries to implement sneak. I tried to post it here but character limit said no.

What am I doing wrong?

I also tried my luck earlier with keypress and timers to make it so spamming (not holding) f would make the player gradually run faster, as a unique and skill-oriented approach to sprinting, but it didn't work so I scrapped it.

0
Originally my question was Need Help Finding API Notes but the site didn't like it. Just looking for resources. BenSmart113 0 — 5y
0
What is script.Parent.Parent.Parent.Parent.Parent User#19524 175 — 5y
0
Can you edit this and put the code in a code block so we can read it more easily? INOOBE_YT 387 — 5y
0
Incap, that's just me going to the local player to get a script a few parents down. BenSmart113 0 — 5y
View all comments (3 more)
0
Inoobe, will do. BenSmart113 0 — 5y
0
That's not a code block .-. ~~~~~~~~~~~~~~~~~ [press enter] ~~~~~~~~~~~~~~~~~ Crazycat4360 115 — 5y
0
Oh, I see. Thank you very much, Crazy. BenSmart113 0 — 5y

Answer this question