This is my script
repeat wait()until game.Players.LocalPlayer and game.Players.LocalPlayer.Character print("Pet Controller Loaded") function MovePet(pet,mode) local character = game.Players.LocalPlayer.Character local rpet = workspace[pet] local rmode = mode local inc = 0.7 if mode == true then -- if this is true then make the pet float local base = character['Head'] local dir = CFrame.new(rpet.Position, base.Position).lookVector print(dir) for i= 0,10,2 do rpet.CFrame = rpet.CFrame + (dir * inc) wait(0.05) end else -- If its anything else other then true then make the pet go on the ground local base = character['Left Foot'] local dir = CFrame.new(rpet.Position, base.Position).lookVector print(dir) for i= 0,10,2 do rpet.CFrame = rpet.CFrame + (dir * inc) wait(0.05) end end end while wait() do MovePet("Pet", false) end?
This is my error Player.Entirely76.PlayerGui.PetController:31: unexpected symbol near '
Try removing the '?' On line 31.
while wait() do
MovePet("Pet", false)
end?