Hello,
I am having problems with my Soccer/Football script.
Info: Brick is anchored.
Error: -- rightVector cannot be assigned to -- Stack Begin -- Script 'Workspace.Ball.BallScripts.Kick', Line 12 -- Stack End
Things inside the ball: https://i.gyazo.com/49ac07d0597e37a3330059ccd7f76f56.png
What the script does: Plays the sounds but no movement..
Script:
local ball = script.Parent.Parent local kicksound = script.Parent.Parent.ImportantStuff.Kick local Wind = script.Parent.Parent.ImportantStuff.WindLOL local speed = script.Parent.Parent.Velocity script.Parent.Parent.Touched:connect(function(h) if (h.Parent.Name ~= "Head" and "Left Arm" and "Right Arm" and "SpawnLocation" and "Torso" and "HumanoidRootPart" and "Baseplate" and "Attatchment" and "Texture") then script.Parent.Parent:Clone().Parent = game.ServerStorage kicksound:Play() wait(0.15) Wind:Play() script.Parent.Parent.CFrame.rightVector = h.CFrame.rightVector -- To head in the direction of inpact. speed = Vector3.new(1, 0, 0) -- Start of movement repeat speed.X = Vector3.new(speed.X + 1, 0, 0) wait(0.15) until speed == Vector3.new(30, 0, 0) wait(5) repeat speed.X = Vector3.new(speed.X - 1, 0, 0) wait(0.15) until speed == Vector3.new(0, 0, 0) wait(0.15) if speed == Vector3.new(0, 0, 0) then Wind:Stop() end -- End of movement end end)
Any help?