본문 바로가기
로블록스로 배우는 코딩 #7 - 용암을 밟으면 HP가 줄어들어요 local humanoid = script.Parent:FindFirstChild("Humanoid") local deBounce = false function lavaTouch(part) print(humanoid.FloorMaterial) if humanoid.FloorMaterial.Name == "CrackedLava" then if not deBounce then deBounce = true while humanoid.FloorMaterial == Enum.Material.CrackedLava do humanoid:TakeDamage(10) wait(1) end deBounce = false end end end humanoid:GetPropertyChangedSignal("FloorMateri.. 2022. 10. 6.
로블록스로 배우는 코딩 #6 - 용암을 밟으면 HP가 줄어들어요 local player = script.Parent local humanoid = player:FindFirstChild("Humanoid") local deBounce = false function lavaTouch(part) if humanoid.FloorMaterial ~= nil and humanoid.FloorMaterial.Name == "CrackedLava" then if not deBounce then deBounce = true humanoid:TakeDamage(10) wait(1) deBounce = false end end end humanoid.Running:Connect(lavaTouch) 강릉바다의 블로그 Since 2008. 1. https://gnbada.kr/ 2022. 10. 6.
로블록스로 배우는 코딩 #5 - 열렸다 닫히는 문 local model = script.Parent local moveCheck = false function touchEventt(part) local character = part.Parent local humanoid = character:FindFirstChild("Humanoid") local wall = game.Workspace.Wall.Center if humanoid ~= nil and not moveCheck then model.Color = Color3.fromRGB(255, 0, 0) moveCheck = true for cnt = 1, 10, 1 do wall.Position = wall.Position - Vector3.new(0, 0, 1) wait(0.1) end wait(5).. 2022. 10. 6.
로블록스로 배우는 코딩 #4 - 옆으로 열리는 문 local model = script.Parent local moveCheck = false function touchEventt(part) local character = part.Parent local humanoid = character:FindFirstChild("Humanoid") local wall = game.Workspace.Wall.Center if humanoid ~= nil and not moveCheck then model.Color = Color3.fromRGB(255, 0, 0) moveCheck = true for cnt = 1, 10, 1 do wall.Position = wall.Position - Vector3.new(0, 0, 1) wait(0.1) end end end.. 2022. 10. 6.
블록스로 배우는 코딩 #3 - 일정시간 통과하는 벽 local model = script.Parent function touchEventt(part) local character = part.Parent local humanoid = character:FindFirstChild("Humanoid") local wall = game.Workspace.Wall.Center if humanoid ~= nil then model.Color = Color3.fromRGB(255, 0, 0) wall.Transparency = 0.8 wall.CanCollide = false wait(5) wall.Transparency = 0 wall.CanCollide = true end end model.Touched:Connect(touchEventt) 강릉바다의 블로그 S.. 2022. 10. 6.
로블록스로 배우는 코딩 #2 - Part 색상 바꾸기 강릉바다의 블로그 Since 2008. 1. https://gnbada.kr/ 2022. 10. 6.