game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)

	
int = 	Instance.new("StringValue")
int.Parent = workspace
int.Value = '50%'

wait(2)
print(tonumber(int.Value)(1000))


end)
end)

So Im trying to turn the % into the real sign not a string and this is supposed to print out 500 but It keeps erroring saying nil value and I know I did something wrong

3 comments

0

tonumber returned nil because it can't convert a % sign into a number. And % is the modulus operator. You need to be more specific.

0

LoadString

0

I want to make an equation with the modulus operator so how can I turn it into like an actually functioning thing?