Please help me with camping type game

Hi, for the past month ive been working on a camping like game. I made a car in the lobby to teleport people to the main map, but its super laggy and the player dies when teleported, heres the script:



	workspace.Car.Position = Vector3.new(52.62, 155.521, 8.33)

	workspace.Car.Transparency = 0.9
	wait(0.1)
	workspace.Car.Transparency = 0.8
	wait(0.1)
	workspace.Car.Transparency = 0.7
	wait(0.1)
	workspace.Car.Transparency = 0.6
	wait(0.1)
	workspace.Car.Transparency = 0.5
	wait(0.1)
	workspace.Car.Transparency = 0.4
	wait(0.1)
	workspace.Car.Transparency = 0.3
	wait(0.1)
	workspace.Car.Transparency = 0.2
	wait(0.1)
	workspace.Car.Transparency = 0.1
	wait(0.1)
	workspace.Car.Transparency = 0



	wait(5)





	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	workspace.Car.Position += Vector3.new(0.2,0,0)

	wait(0.1)

	game.Players:GetChildren()[1].Character.Head.Position = workspace.Map.Spawns.Spawn1.Position
	wait(0.1)
	game.Players:GetChildren()[2].Character.Head.Position = workspace.Map.Spawns.Spawn2.Position
	wait(0.1)

	game.Players:GetChildren()[3].Character.Head.Position = workspace.Map.Spawns.Spawn1.Position
	wait(0.1)
	game.Players:GetChildren()[4].Character.Head.Position = workspace.Map.Spawns.Spawn3.Position
	wait(0.1)

	game.Players:GetChildren()[5].Character.Head.Position = workspace.Map.Spawns.Spawn1.Position
	wait(0.1)

	game.Players:GetChildren()[6].Character.Head.Position = workspace.Map.Spawns.Spawn4.Position
	wait(0.1)

	game.Players:GetChildren()[7].Character.Head.Position = workspace.Map.Spawns.Spawn1.Position
	wait(0.1)

	game.Players:GetChildren()[8].Character.Head.Position = workspace.Map.Spawns.Spawn5.Position

	if workspace.Map.Monster.Attack.Value == 1 then
		workspace.Map.Monster.Head.Position = game.Players:GetChildren()[1].Character.Head.Position
	elseif workspace.Map.Monster.Attack.Value == 2 then
		workspace.Map.Monster.Head.Position = game.Players:GetChildren()[2].Character.Head.Position
	elseif workspace.Map.Monster.Attack.Value == 3 then
		workspace.Map.Monster.Head.Position = game.Players:GetChildren()[3].Character.Head.Position
	elseif workspace.Map.Monster.Attack.Value == 4 then
		workspace.Map.Monster.Head.Position = game.Players:GetChildren()[4].Character.Head.Position
	elseif workspace.Map.Monster.Attack.Value == 5 then
		workspace.Map.Monster.Head.Position = game.Players:GetChildren()[5].Character.Head.Position
	elseif workspace.Map.Monster.Attack.Value == 6 then
		workspace.Map.Monster.Head.Position = game.Players:GetChildren()[6].Character.Head.Position
	elseif workspace.Map.Monster.Attack.Value == 7 then
		workspace.Map.Monster.Head.Position = game.Players:GetChildren()[7].Character.Head.Position
	elseif workspace.Map.Monster.Attack.Value == 8 then
		workspace.Map.Monster.Head.Position = game.Players:GetChildren()[8].Character.Head.Position

	end
  
1 Like

TweenService

1 Like

Honestly, I’m not shocked it’s laggy. Instead of copying and pasting ALL OF THAT, just use TweenService.

1 Like

how do i use it? i tried to but it keeps error and it wont move

TweenService:Create(part, TweenInfo.new(1), {Transparency = 0}):Play()

Describe the error, or copy and paste your output. (do the second for the love of god)

Also, please learn the basics of Roblox LUAu, trying to build a full game without any knowledge WONT
WORK. Trust me, I’ve been there and done that.

1 Like

my head exploded after i read your code

3 Likes

how do i see output???

Lets start with this then. Learn the basics of roblox studio, let alone coding. As previously stated, jumping ahead of yourself will never get you anywhere. With 5+ years of experience, I would know.

1 Like

i found out how to open output?

TweenInfo.new second argument expects Enum.EasingStyle input  -  Server - Script:27
  01:07:52.447  Stack Begin  -  Studio
  01:07:52.447  Script 'ServerScriptService.Script', Line 27  -  Studio - Script:27
  01:07:52.447  Stack End  -  Studio

You haven’t passed the right arguments. Look at the page we sent you.

PS it is literally telling you what you did wrong, it excepted and easing style but got something else



wait(5)

game:GetService("TweenService"):Create(workspace.Car, TweenInfo.new(5, Enum.EasingStyle.Linear), {Position = Vector3.new(500.62, 155.521, 8.33)}):Play()

this is my code where it errors

you shouldnot repeat yourself when typing code
you should use task.wait() instead of wait as its more precise and doesnot throttle making it more performant + wait is deprecated
i think that you know for loops since you know vector3 values
you can replace

workspace.Car.Transparency = 0.9
	wait(0.1)
	workspace.Car.Transparency = 0.8
	wait(0.1)
	workspace.Car.Transparency = 0.7
	wait(0.1)
	workspace.Car.Transparency = 0.6
	wait(0.1)
	workspace.Car.Transparency = 0.5
	wait(0.1)
	workspace.Car.Transparency = 0.4
	wait(0.1)
	workspace.Car.Transparency = 0.3
	wait(0.1)
	workspace.Car.Transparency = 0.2
	wait(0.1)
	workspace.Car.Transparency = 0.1
	wait(0.1)
	workspace.Car.Transparency = 0

with

for i=0,1,0.1 do
	workspace.Car.Transparency = i
        task.wait(0.1)
end

here is a vid about loops

2 Likes

Format your code, use variables and multiple lines.

how do i even do that???

Or he could use TweenService, it’s much more effiecient.

Do what? You need to make your code readable. Putting it all on one line makes it unreadable.

i tried it keeps erroring, i dont think u understand.

if he want his transparency to be like 0.1,0.2,0.3 then tweenservice isnot for that tween service will increase the value smoothly like that 0.01,0.03,0.4 etc

1 Like