課程檔案 ⬇️
local move = script.Parent
local speed = 1
local count = 0
while true do
move.Position += Vector3.new(speed,0,0)
count +=1
wait (0.1)
if count%10 == 0 then
speed *= -1
end
end
local goalline = script.Parent
function onTouched(hit)
local humanoid = hit.Parent:FindFirstChild("Humanoid")
if humanoid then
print("goal")
end
end
goalline.Touched:Connect(onTouched)
local goalline = script.Parent
function onTouched(hit)
local humanoid = hit.Parent:FindFirstChild("Humanoid")
if humanoid then
humanoid.JumpHeight = 50
end
end
goalline.Touched:Connect(onTouched)
local goalline = script.Parent
function onTouched(hit)
local humanoid = hit.Parent:FindFirstChild("Humanoid")
if humanoid then
humanoid.Health = 0
end
end
goalline.Touched:Connect(onTouched)
local spawnLocation = script.Parent
while true do
spawnLocation.BrickColor = BrickColor.Random()
wait(0.5)
end