#luck change

1 messages · Page 1 of 1 (latest)

main sierra
#

So have a simple math.random script and i was wondering if anyone could help me with making an editable text label where you can multiply or somehow change your luck
I am really bad at scripting and i wouldnt figure out myself. thanks

vivid plume
#

idk

vivid plume
smoky rock
# main sierra So have a simple math.random script and i was wondering if anyone could help me ...

Well considering the post guidelines say

4️⃣ We won't write scripts for you. This forum channel is solely for asking questions.
We can try and guide you, but can't make it for you.

If you show us the code it may help.

If you take a look at the TextBox gui (https://create.roblox.com/docs/reference/engine/classes/TextBox) that'd be a good place to start. You'd have to make it custom to limit the input to only numbers by its OnPropertyChanged("Text") event and replacing the text

Then use that to change the threshold you check for

main sierra
#

mutliple ppl already made a script for me

#

in this chanel

vivid plume
#

u type allat so fast

smoky rock
main sierra
#

nft ahh pfp

high mango
vivid plume
smoky rock
vivid plume
#

gah

smoky rock
main sierra
#

this aint place to beef ok?

#

keep this in dms or something

vivid plume
smoky rock
main sierra
#

i was just guessing

vivid plume
#

i keep procastinating scripting😢

main sierra
#

i think i can figure this out but i really just want to know how do i change the math.random luck

#

somehor

#

w

smoky rock
main sierra
#

huh

smoky rock
main sierra
#

it generates random number on button click

#

script.Parent.MouseButton1Click:Connect(function()
rng = math.random(1,10000000)
RollValue.Value = rng
end)

#

really simple

#

id say

smoky rock
main sierra
#

RollValue.Changed:Connect(function()
if RollValue.Value <= 10000000 then
game.ReplicatedStorage.Transform:FireServer("Common")
end
if RollValue.Value <= 2000000 then
game.ReplicatedStorage.Transform:FireServer("Uncommon")
end
end)

smoky rock
# main sierra RollValue.Changed:Connect(function() if RollValue.Value <= 10000000 then gam...

Okay, so that first if is going to run no matter what, as you're rolling a 10,000,000 die, and saying all values at 10,000,000 and below will be "Common", so that's every value

I'd suggest going from lowest chance to highest for if-statements

but to increase the chance for any one type, increase the number on the right side of the check

so RollValue.Value <= 9_000_000 is a lower chance than RollValue.Value <= 10_000_000

main sierra
#

i understand but i dont

smoky rock
main sierra
#

well i dont know how to go from lowest to highest chance and why do i need to

smoky rock
main sierra
smoky rock
main sierra
#

ok

#

so if i had to guess we wont change math.random but the ifs right?

smoky rock
main sierra
#

@smoky rock I actually have to finish something in game. So ill let you know when we can do this again.

smoky rock
main sierra
smoky rock
main sierra
#

like with same chance

#

oh and- can you just tell me how to kill local player using script?

#

@smoky rock

smoky rock
main sierra
#

yeah i found out

#

can i make a second if?

smoky rock
main sierra
#

...

#

well it sounds stupid but

#

i need 2 rarities with same chance

#

so if i make another if

#

then i can make the other

smoky rock
main sierra
#

well... ig ill just change the chance to sometin different

smoky rock
main sierra
#

oh i can just make the chance like .0001 higher and it will be the samew

main sierra
#

@smoky rock why cant i label the local player character in regular script?

smoky rock
main sierra
#

well i want to create an remote even that kills localplayer

#

oh

hot girderBOT
#

studio** You are now Level 8! **studio

main sierra
#

@smoky rock how can you make the player respawn faster?

smoky rock
main sierra
#

ok

main sierra
#

@smoky rock uhh wanna do the luck change thing?

main sierra
#

why

smoky rock
main sierra
#

oh ok just tell me when u got time

#

if you want to still help me

smoky rock