Hello, I was wondering if it’s possible to convert C# (the coding that unity uses) to Roblox LUA.
If I posted this in the wrong topic, my bad.
Reason why I want a converter
Camera shaker
public class CameraEffects : MonoBehaviour {
public GameObject object;
Vector3 setPosition;
float minPerlin = -1.0f, maxPerlin = 1.0f;
// Use this for initialization
void Start ()
{
setPosition = transform.position;
}
// Update is called once per frame
void Update ()
{
Vector3 newPos;
newPos = setPosition;
newPos.x = Mathf.PerlinNoise( newPos.x * minPerlin, newPos.x * maxPerlin);
newPos.y = Mathf.PerlinNoise( newPos.y * minPerlin, newPos.y * maxPerlin);
transform.position = newPos;
}
}
Best I can do
local minPerlin = -1.0;
local maxPerlin = 1.0;
local camera = workspace.CurrentCamera
function Update()
camera.CFrame = math.noise(camera.CFrame.X*minPerlin,camera.CFrame.Y*maxPerlin);
end
for i = 1, 200 do
wait()
Update()
end