Coming to Cuberite Lua from ROBLOX Lua
#1
I've been scripting in Lua for as long as I can remember, and the majority of my experience is through ROBLOX. For those of you who have never used it, ROBLOX has a very vast scripting API, and its syntax is really unique and agreeable. Scripts can run either on the server or on a client. For example, take the following line, which kicks the player "dusk" from the game:

game.Players.dusk:Kick()

Or the following client script, which creates a new cube in the game world and places it on top of your character's head:

cube = Instance.new("Part", game.Workspace)
cube.Size = Vector3.new(3,3,3) --a 3x3x3 cube
cube.Position = game.Players.LocalPlayer.Character.Head.Position

Or the following server script, which sets a player's head on fire every time they join the game:

function ignite(plr)
    Instance.new("Fire", plr.Character.Head)
end

game.Players.PlayerAdded:connect(ignite)

When looking at cuberite's API, it seems to be a lot less intuitive than this, but that might just be bias because of how long I've used ROBLOX Lua. Is there any way for me to easily get familiar with Cuberite's API in the same way I am familiar with ROBLOX's? And is there anything I can do to make Cuberite plugin scripting feel more like ROBLOX scripting?

ThanksTongue
Reply
Thanks given by:


Messages In This Thread
Coming to Cuberite Lua from ROBLOX Lua - by dusk - 10-23-2017, 02:32 PM



Users browsing this thread: 1 Guest(s)