Please Answer in English où en français merci/thank you

This is my code for an only admin fly script. The error looks to be in the first line:



if game.Players.LocalPlayer.Name == "MyName" and "NameOfSomeone" then
	
repeat wait() until game.Players.LocalPlayer.Character

local plr = game.Players.LocalPlayer
local char = plr.Character
local hum = char:WaitForChild("Humanoid")
local Torso = char:WaitForChild("LowerTorso")
local Mouse = plr:GetMouse()
local toggle = false

Mouse.KeyDown:Connect(function(key)
	if key == "ç" then
		if toggle == false then
			toggle = true
			local Anim = Instance.new("Animation")
			Anim.Animationid = "rbxassetid://6368249485"
			local PlayAnim = hum:LoadAnimation(Anim)
			PlayAnim:Play()
			local BV = Instance.new("BodyVelocity",Torso)
			BV.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
			while toggle == true do
				BV.Velocity = Mouse.Hit.lookVector*100
				wait()
			end
		end
		if toggle == true then
			toggle = false
			Torso:FindFirstChildOfClass("BodyVelocity"):Destroy()
			local tracks = hum:GetPlayingAnimationTracks()
			for i, stoptracks in pairs(tracks) do
				stoptracks:Stop()
			end
			local Anim = Instance.new("Animation")
			Anim.AnimationID = "rbxassetid://0"
			local PlayAnim = hum:LoadAnimatin(Anim)
			PlayAnim:Play()
		end
	end
end)

end

Thanks for help !

4 comments

0

Is this a local script or a server script?

0

This looks mad stolen.

0

This is a server script i could try with a local script

0

hu ok i had understanded i used localplayer in a server script