So I want to update the price of something based on DataStore when player joins.
where Price.Value is always 100, and power.Value is a DataStore value, in this instance 3.
What I think 3^3 does is
--so if I do 3^5 It will do
But it seems like I use the wrong operator, because instead of 2700 ( 100*(3^3) ), it gives me 24300 something
What operator should I use to get the “degree” (I dont remember if thats what its called) of a number
The operators are correct, and the order of operations should be fine, even without the parentheses. Have you tried printing
Price.Value is always 100. Power.Value in this case is 3. I didn’t check power value, it may have been 4, but in that case it should ve given 81000, not a weird 24300. But I will check them again
The reason you got 24300 is because power.Value is equal to 5 in the equation.
100 * (3^5) = 24300
If power.Value is 3 then it would result in
100 * (3^3) = 2700
I forgot that I was updating price value in a more simple way in another part of the script, so it wasn’t always 100. Thanks for the replies