How solve this
This is code
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[DisallowMultipleComponent]
public class Oscillatos : MonoBehaviour
{
[SerializeField] Vector3 movementVector;
[Range(0,1)]
[SerializeField]
float movementFatcor;
Vector3 startingPos;
// Start is called before the first frame update
void Start()
{
Vector3 startingPos = transform.position;
}
// Update is called once per frame
void Update()
{
Vector3 offset = movementVector * movementFatcor;
transform.position = startingPos + offset;
}
}