“Lua Roblox” Código de respuesta

Roblox lua

//zero gravity ball script\\
script.Parent.Activated:Connect(function()
	local part = Instance.new("Part")
	local fire = Instance.new("Fire")
	local force = script.Parent.cloneme:Clone()
	force.Parent = part
	fire.Parent = part
	part.Shape = Enum.PartType.Ball
	part.Parent = game.Workspace
	part.Position = script.Parent.Handle.Position
	part.Touched:Connect(function(otherpart)
		local Brick = part
		local function PlayerTouched(Part)
			local Parent = Part.Parent
			if game.Players:GetPlayerFromCharacter(Parent) then
				Parent.Humanoid.WalkSpeed = 32
			end
		end

		Brick.Touched:connect(PlayerTouched)
	end)
end)


//zero gravity script rember to always name part Handle and put it in tool in 
starter pack with these two scripts\\
local part = script.Parent

local force = Instance.new("BodyForce")
force.Parent = part

local antigrav = workspace.Gravity * part:GetMass()

force.Force = Vector3.new(0, antigrav, 0)

Roblox lua Coder

Lua Roblox

--[[
The UserInputService allows the developer to do a certain thing once a Key
is pressed. 
UserInputService ONLY WORKS IN A CLIENT SCRIPT!!
--]]

local UIS = game:GetService("UserInputService") -- Get the Service

UIS.InputBegan:Connect(function(input, gameProcessedEvent)
--[[
The input is whatever key the player presses on their keyboard. 
The gameProcessedEvent is true if the player is chatting, sitting down or doing
core Roblox things. In most cases you want to only run your script if it is false.
--]]
	if not gameProcessedEvent and input.KeyCode == Enum.KeyCode.R then
    	print("The player pressed the "..input.KeyCode.Name.." Key!")
	end
end)

UIS.InputEnded:Connect(function(input, gpe)
	if not gpe and input.KeyCode == Enum.KeyCode.R then
    	print("The player stopped holding the "..input.KeyCode.Name.:" Key!")
	end
end)

-- [[
NOTE !!!!!!!!!! 
InputEnded MUST be used in a synchronized script.
--]]
Shiny Swiftlet

Roblox lua

--oh no why won't this work 
local e = script.Parent
if e.Parent = game.Workspace then
	
end
---maybe try this 
local e = script.Parent
if e.Parent == game.Workspace then
print("Part is apart of workspace")
end
Roblox lua Coder

Roblox lua

/why won't this work?\
print("loop")
repeat
	
until
/well its actually\
while true do
	wait(1)
	print("loop")
end
/or\
local timeout = 10 
local Time = 0

while true do
	wait(1)
	print("looping")
	Time = Time + 1
	if Time == timeout then
		break
		
	end
end

Roblox lua Coder

Lua Roblox

local function testFunc()	-- Here, the built-in wait function is overwritten with a number	wait = 1	print(wait)end testFunc() -- This will now trigger a runtime errorwait(1)
Powerful Petrel

Respuestas similares a “Lua Roblox”

Preguntas similares a “Lua Roblox”

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código