#idk honestly

1 messages · Page 2 of 1

shy dust
#

since playeradded already fired

#

i mean i can just make it so you cant reset

#

or die

#

lol

lyric leaf
#

That is a solution

shy dust
#

my game aint about dying anyway

lyric leaf
#

yup

shy dust
#

yo do you know how to send a server message if i get a rare roll or smth?

shy dust
#

@lyric leaf

lyric leaf
#

what exactly do you mean by a "Server message"

#

Like a message that every player sees?

#

Like a broadcast?

#

Or just a message that is sent to the Server so you know which player just got rare on the server

shy dust
#

i mean like a chat message @lyric leaf

#

sry it took me a while

#

yes that every player sees

#

in the normal chat

#

i never figured that out

lyric leaf
#

Aaa i see

#

I just looked into it and this would be an example for sending messages via code:

local TextChatService = game:GetService("TextChatService")

local function BroadcastMessage(message)
    local channel = TextChatService:WaitForChild("TextChannels"):WaitForChild("RBXGeneral")
    channel:DisplaySystemMessage(message)
end

BroadcastMessage("Yo")

Note tho: You can only use DisplaySystemMessage on the client

#

Depends tho what kind of chat system your using

#

or idk if they already got rid of all the old versions

#

Just try this code inside a local script and if it works then i think you can figure out the rest

#

@shy dust

shy dust
#

ok

#

@lyric leaf numbervalue can store decimals like 0.1 while int just rounds it cuz it can store only full numbers right?

shy dust
#

ok

shy dust
potent sentinel
#

why is this 1k messages

#

and a month old wot

shy dust
#

just ignore this you wont help prob

potent sentinel
#

i wont help with an entire game but simple things ya

shy dust
potent sentinel
lyric leaf
# shy dust i put local script into workspace and nothing

Try this:

local TextChatService = game:GetService("TextChatService")

local function Message(message)
    local channel = TextChatService:WaitForChild("TextChannels"):WaitForChild("RBXGeneral")
    channel:DisplaySystemMessage(message)
end

task.wait(2)

Message("Yoooo")
#

And Pyro is right. Its better to make a new thread. Who knows maybe he would also help.

barren willow
shy dust
lyric leaf
#

how old is your game?

#

And can send me a screenshot of your TextChatService Properties?

#

or tell me if they are different from the screenshot i just send you

lyric leaf
shy dust
#

almost

lyric leaf
#

alr

shy dust
#

i dont wanna make something super complicated

#

@lyric leaf

lyric leaf
#

huh. Seems fine. Maybe put the local script into StarterCharacterScripts? And if it still doesn't work show me the error message

potent sentinel
shy dust
#

that works @lyric leaf

#

if its in startercharcter

lyric leaf
#

alr gud

potent sentinel
#

probably better to put it in starterplayer

shy dust
#

ik how

#

i think

#

yeah i know how to do this now

#

although i wish i could send the message for everyone

#

if that could somehow work

potent sentinel
shy dust
#

oh

#

any way to edit the message color/font etc.?

potent sentinel
#

ai lua local TextChatService = game:GetService("TextChatService") local message = "You won <stroke color='#00A2FF' thickness='2'>25 gems</stroke>!" TextChatService.TextChannels.RBXGeneral:DisplaySystemMessage(message)

shy dust
#

so

#

im back

shy dust
#

@lyric leaf can you help?

lyric leaf
#

sure i can try

#

Whats the matter

shy dust
#

well

#

revember the roll script

#

well i decided to changed a lil

lyric leaf
#

ok

shy dust
#

pretty much game now rolls 2 different times

#

wait

#

it is

lyric leaf
#

?

shy dust
#

it is supposted to check which one is bigger

#

and the smaller one will get changed

#

like

#

the numbervalue

#

and since its changed

#

...

#

nwm

#

gimme a sec

lyric leaf
#

ok

shy dust
#

this abomination

#

uhh

#

i cant send it??

lyric leaf
#

try sending it as an text message

#

text file*

shy dust
#
    local rng = math.random(1,1000000000)
    local secretrng = math.random(1,1000000000)
    local leaderstats = Player:WaitForChild("leaderstats")
    local RarityLeaderstat = leaderstats.HighestRarity
    local RerollsLeaderstat = leaderstats.Rerolls
    local RollUI = Player.PlayerGui.UI.RollUI
    
    if secretrng < rng then
        SecretValue.Value = secretrng
    elseif secretrng == rng then
        SecretValue.Value = secretrng
    elseif secretrng > rng then
        RollValue.Value = rng
    else
        print("Error Code: 2")
    end
    
    RerollsLeaderstat.Value = RerollsLeaderstat.Value + 1
    
    RollValue.Changed:Connect(function()
        if RollValue.Value < HighestValue.Value then
            HighestValue.Value = RollValue.Value
        end
    end)
    
    RollValue.Changed:Connect(function()
        if RollValue.Value <= 0 then
            print("Error")
        elseif RollValue.Value <= 200000000 then
            RollUI.UnCommon.Visible = true
            UnlockIndex:FireClient(Player, "UnCommon")
            if RarityLeaderstat.Value <= 5 then
                RarityLeaderstat.Value = 5
            end
        elseif RollValue.Value <= 1000000000 then
            RollUI.Common.Visible = true
            UnlockIndex:FireClient(Player, "Common")
            if RarityLeaderstat.Value <= 1 then
                RarityLeaderstat.Value = 1
            end
        end
    end)
    
    SecretValue.Changed:Connect(function()
        if SecretValue.Value <= 0 then
            print("Error")
        elseif SecretValue.Value <= 10000000 then
            RollUI.Nothing.Visible = true
            UnlockIndex:FireClient(Player, "Nothing")
            if RarityLeaderstat.Value <= 100 then
                RarityLeaderstat.Value = 0.01
            end
        end
    end)
end)```
lyric leaf
#

Ah i see

shy dust
#

so line 2 and 3 generates 2 different numbers, rng and secretrng

#

wait

#

gotta fix ome thing

lyric leaf
#

alr

shy dust
#
    local rng = math.random(1,1000000000)
    local secretrng = math.random(1,1000000000)
    local leaderstats = Player:WaitForChild("leaderstats")
    local RarityLeaderstat = leaderstats.HighestRarity
    local RerollsLeaderstat = leaderstats.Rerolls
    local RollUI = Player.PlayerGui.UI.RollUI
    
    if secretrng <= rng then
        SecretValue.Value = secretrng
    elseif secretrng > rng then
        RollValue.Value = rng
    else
        print("Error Code: 2")
    end
    
    RerollsLeaderstat.Value = RerollsLeaderstat.Value + 1
    
    RollValue.Changed:Connect(function()
        if RollValue.Value < HighestValue.Value then
            HighestValue.Value = RollValue.Value
        end
    end)
    
    RollValue.Changed:Connect(function()
        if RollValue.Value <= 0 then
            print("Error")
        elseif RollValue.Value <= 200000000 then
            RollUI.UnCommon.Visible = true
            UnlockIndex:FireClient(Player, "UnCommon")
            if RarityLeaderstat.Value <= 5 then
                RarityLeaderstat.Value = 5
            end
        elseif RollValue.Value <= 1000000000 then
            RollUI.Common.Visible = true
            UnlockIndex:FireClient(Player, "Common")
            if RarityLeaderstat.Value <= 1 then
                RarityLeaderstat.Value = 1
            end
        end
    end)
    
    SecretValue.Changed:Connect(function()
        if SecretValue.Value <= 0 then
            print("Error")
        elseif SecretValue.Value <= 10000000 then
            RollUI.Nothing.Visible = true
            UnlockIndex:FireClient(Player, "Nothing")
            if RarityLeaderstat.Value <= 100 then
                RarityLeaderstat.Value = 0.01
            end
        end
    end)
end)```
#

here

#

then it checks if secretrng is smaller than rng and if it is then it makes secretvalue secretrng

#

if rng is smaller than secretrng then it makes value of rollvalue rng

#

if rollvalue gets changed it does one function and if secretvalue gets changed then is does the other function

#

i tried making this myself

#

but pretty much

#

im trying to make it so it rolls twice and if one if smaller than the other then it uses only one of the functions

#

before i had it all in one function

#

where is did something based on one random number

#

but here it generates 2 numbers and based on which one is smaller it only uses one of the functions that does something based on the number that was smaller

#

i cant explain it better

#

now that i think abt it

#

im making this too complicated

lyric leaf
#

So what is exactly the problem?

shy dust
#

i mean

#

i feel like the problem is there

#

wait

lyric leaf
#

All i can see right now is the UI problem

#

But i feel like thats not what your point is

shy dust
#

what

#

well yeah it is kinda in the ui

#

cuz sometimes it doesnt show up

lyric leaf
#

Im pretty sure that you cannot change UI elements on the server

lyric leaf
shy dust
#

but

#

no

lyric leaf
#

just make it so that that is on the client (RollUI.UnCommon.Visible = true)

shy dust
#

it does work

#

just not always

lyric leaf
#

that is weird

shy dust
#

it sometimes does show up

#

well

#

cuz

#

local RollUI = Player.PlayerGui.UI.RollUI

#

when you roll it sends the player to this script

#

which means the script has the player meaning you can change client side things

lyric leaf
#

Yeah but changing something on the server and changing something on the client can have completly different results.

shy dust
#

such as UI

lyric leaf
#

It can only request the client to change something

shy dust
#

wait what

lyric leaf
#

The Client has complete control over its view. A client could basicly create its own gui and its own interface if it wants to

#

Thats also the reason why we need RemoteEvents. They are the only way to communicate with the client

shy dust
#

no

#

no

#

wait

#

so i have to make another client event

lyric leaf
#

No

#

May i see your local script?

shy dust
#

which?

lyric leaf
#

the one where you recive information from UnlockIndex

#

The one with the UnlockIndex RemoteEvent

shy dust
#
local NonSecretsFrame = Player.PlayerGui.UI.Index.NonSecretsFrame
local PositiveSecretsFrame = Player.PlayerGui.UI.Index.PositiveSecretsFrame
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local UnlockIndex = ReplicatedStorage.UnlockIndex

UnlockIndex.OnClientEvent:Connect(function(title)
    if title == "Common" then
        NonSecretsFrame.Common.Title.Text = "Common"
        NonSecretsFrame.Common.EquipButton.EquipLabel.Enabled = true
    elseif title == "Uncommon" then
        NonSecretsFrame.Uncommon.Title.Text = "Uncommon"
        NonSecretsFrame.Uncommon.EquipButton.EquipLabel.Enabled = true
    elseif title == "Nothing" then
        PositiveSecretsFrame.Nothing.Title.Text = "Nothing"
        PositiveSecretsFrame.Nothing.EquipButton.EquipLabel.Enabled = true
    end
end)```
#

i could open the ui using unlock index but

#

i cant

#

cuz i want the ui to open only during rolling

#

and i use unlockindex for example for loading data

#

so i cant use it there

lyric leaf
#

But you do make the RollUI Visible right before firing the RemoteEvent. So why can't you just copy this line (RollUI.UnCommon.Visible = true) and place it inside your local script?

shy dust
#

i just said i

#

t

#

cuz i use this unlock index to load data

#

when the player joins the game it uses unlockindex based on the stored data

#

but i want to make rollui visible only when rolling

#

i use unlockindex for other things

#

ig ill have to use another remote event

lyric leaf
#

oh wiat

#
local Player = game.Players.LocalPlayer
local NonSecretsFrame = Player.PlayerGui.UI.Index.NonSecretsFrame
local PositiveSecretsFrame = Player.PlayerGui.UI.Index.PositiveSecretsFrame
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local UnlockIndex = ReplicatedStorage.UnlockIndex
local RollUI = Player.PlayerGui.UI.RollUI

UnlockIndex.OnClientEvent:Connect(function(title)
    if title == "Common" then
        RollUI.Common.Visible = true
        NonSecretsFrame.Common.Title.Text = "Common"
        NonSecretsFrame.Common.EquipButton.EquipLabel.Enabled = true
    elseif title == "Uncommon" then
        RollUI.UnCommon.Visible = true
        NonSecretsFrame.Uncommon.Title.Text = "Uncommon"
        NonSecretsFrame.Uncommon.EquipButton.EquipLabel.Enabled = true
    elseif title == "Nothing" then
        PositiveSecretsFrame.Nothing.Title.Text = "Nothing"
        PositiveSecretsFrame.Nothing.EquipButton.EquipLabel.Enabled = true
    end
end)
#

Just liek this

#

it shouldn't interfer with your DataStores or anything at all. I just made it so that RollUI gets Enabled on the client

#

nothing more

shy dust
#

i should explain

lyric leaf
#

alr

shy dust
#

so i have leaderstats

#

which saves your highest rol

lyric leaf
#

yeah

shy dust
#

when the leaderstats are loaded upon the player joining it unlocks the index that was saved as the rarest and i do not want it to also show rolling it when you join.

#

i just want it to unlock

lyric leaf
#

ah i see. Just make a new argument

shy dust
#

too late im already making another remoteevent

#

its not that long

#

ShowRoll.OnClientEvent:Connect(function(Title)
RollUI[Title].Visible = true
end)

#

whats this

#

the rollui[title]

lyric leaf
#

?

shy dust
#

does it like

#

pick whatever is the title

#

cuz yk i have folder of these uis

#

ai made that just now

lyric leaf
#

[Title] pretty much is just a string if im not wrong so it should work i think. (Unless you give it a wrong title then it will error)

#

It just needs the exact name of the UI element now

shy dust
#

oh

ember fossilBOT
#

studio** You are now Level 14! **studio

shy dust
#

actually ill do smth else now ill tell you in few hours

lyric leaf
#

alr gl

shy dust
#

uhh

#
local ShowRoll = ReplicatedStorage.ShowRoll

ShowRoll.OnClientEvent:Connect(function(Player, Title)
    local RollUI = Player.PlayerGui.UI.RollUI
    RollUI[Title].Visible = true
end)```
#

this is the remote event ive made

shy dust
#

@lyric leaf

#

?

#

@lyric leaf

lyric leaf
#

Almost

#

The main idea is good but you did make a mistake when it comes to argumentes of RemotEvents

#

Instead of doing ```lua
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ShowRoll = ReplicatedStorage.ShowRoll

ShowRoll.OnClientEvent:Connect(function(Player, Title)
local RollUI = Player.PlayerGui.UI.RollUI
RollUI[Title].Visible = true
end)

You have to do 
```lua
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ShowRoll = ReplicatedStorage.ShowRoll
local Player = game.Players.LocalPlayer
local RollUI = Player.PlayerGui.UI.RollUI

ShowRoll.OnClientEvent:Connect(function(Title)
    RollUI[Title].Visible = true
end)
#

Always remember that the first Argument the Client recives from a RemoteEvent is not the Player

shy dust
#

but

#

i recieve the info from the server

#

so i have to include the player

lyric leaf
#

Yes. You only have to include the Player on the Server so the Game knows to which client it must sent the Information.

#

The First Argument of the function ShowRoll:FireClient(Player, "Common") is not getting passed to the client. Its only purpose is to let the game know to who it should send the information

#

And because the client always knows to which player it belongs it doesn't need to recive the player from a RemoteEvent that was fired on the server

shy dust
lyric leaf
#

yeah

shy dust
#

ok

#

well here goes nothing

#

it works.. kinda

#

but

lyric leaf
#

?

shy dust
#

it doesnt always show up

#

only some times

#

the ui

#

when i click the buton

#

i also made so the button has cooldown

#

do you cant spam it

#

and possibly break the thing

#
local RollButton = script.Parent
local RollUI = Player.PlayerGui.UI.RollUI
local ReplicatedStorage = game:GetService("ReplicatedStorage")

RollButton.MouseButton1Click:Connect(function()
    wait(0.1)
    for _, v in next, RollUI:GetChildren() do
        if v:IsA("Frame") then
            v.Visible = false
        end
    end
    ReplicatedStorage.Roll:FireServer(Player)
    RollButton.Interactable = false
    wait(0.5)
    RollButton.Interactable = true
end)```
#

this is local script under button

#

idk if its right

#

every time you roll it will remove any visible rollui

#

wait

#

i might know

#

ofc

#

i just have to remove the wait(0.1)

#

its still broken

#

some times

lyric leaf
#

hm.

shy dust
#

i think its gotta do with the secretrng and rng

#

yk

lyric leaf
#

Can you give me some video footage

shy dust
#

wait

#

ill test if it even chooses anything

#

ohhh

#

i found out every time you roll secret rng it just doesnt show the roll

#
        SecretValue.Value = secretrng
        print("Rolled Secret Rng")
    elseif secretrng > rng then
        RollValue.Value = rng
        print("Rolled Rng")
    else
        print("Error Code: 2")
    end```
#

this is what i used

#

and every time it printed rolled secret rng the ui didnt show

lyric leaf
#

did you fire the client?

shy dust
#

yes

#

wait ill try

#

to test that too

#

ok so

#

it doesnt actually fire

lyric leaf
#

huh

shy dust
#
        if SecretValue.Value <= 0 then
            print("Error")
        elseif SecretValue.Value <= 285714 then
            ShowRoll:FireClient(Player, "Legacy")
            UnlockIndex:FireClient(Player, "Legacy")
            if RarityLeaderstat.Value <= 3500 then
                RarityLeaderstat.Value = 0.35
            end
        elseif SecretValue.Value <= 769230 then
            ShowRoll:FireClient(Player, "Positive")
            UnlockIndex:FireClient(Player, "Positive")
            if RarityLeaderstat.Value <= 1300 then
                RarityLeaderstat.Value = 0.13
            end
        elseif SecretValue.Value <= 1111111 then
            ShowRoll:FireClient(Player, "Effect")
            UnlockIndex:FireClient(Player, "Effect")
            if RarityLeaderstat.Value <= 900 then
                RarityLeaderstat.Value = 0.09
            end
        elseif SecretValue.Value <= 10000000 then
            ShowRoll:FireClient(Player, "Nothing")
            UnlockIndex:FireClient(Player, "Nothing")
            if RarityLeaderstat.Value <= 100 then
                RarityLeaderstat.Value = 0.01
            end
        end
    end)```
#

this is the whole secretrng thing

#

that detects what u rolled using only secretrng

lyric leaf
#

try printing right after SecretValue is changed

#

just testing a theory

shy dust
#
    RollUI[Title].Visible = true
    print(Title)
end)```
#

this is what i just tested

#

it didnt print the title when i rolled secret rng

shy dust
shy dust
#

it does print

lyric leaf
#

hm

shy dust
lyric leaf
#

no then it would show you that

shy dust
#

no but like logically

#

that i made something that makes sence but doesnt do what i want it

#

to do

#

i happens to me sometime

shy dust
lyric leaf
#

alr

ember fossilBOT
#

studio** You are now Level 14! **studio

shy dust
#

the rarity

#

yep it doesnt print

#

so the problem is that it cannot read what you rolled

#

liek the number

lyric leaf
#

hm

shy dust
#

and it didnt print

lyric leaf
#

try printing for every of the elseifs

#

and print which rarity it was

shy dust
#

nope

#

nothing

#

printed

#

like

#

literally nothing

#
    local rng = math.random(1,1000000000)
    local secretrng = math.random(1,1000000000)
    local leaderstats = Player:WaitForChild("leaderstats")
    local RarityLeaderstat = leaderstats.HighestRarity
    local RerollsLeaderstat = leaderstats.Rerolls
    
    if secretrng <= rng then
        SecretValue.Value = secretrng
        print("Rolled Secret Rng")
    elseif secretrng > rng then
        RollValue.Value = rng
        print("Rolled Rng")
    else
        print("Error Code: 2")
    end```
#

this is the beginning of the script

#

if there is something wrong

lyric leaf
#

so it prints Secret Rng but it doesn't print a rarity after that

shy dust
#

yes

lyric leaf
#

but it does print if the Event SecretValue.Changed is fired?

shy dust
#

?

#

uhh

#

yes

lyric leaf
#
SecretValue.Changed:Connect(function()
      print("SecretValue was Changed")

Try this

shy dust
#

it does

lyric leaf
#

WHAT

#

hm

shy dust
#

@gloomy fiber can you help?

#

they seems to also be good at scripting idk

lyric leaf
#

print which number Secret Rng is

lyric leaf
shy dust
#

ill prin the value of SecretValue

lyric leaf
shy dust
#

it prints normally

lyric leaf
#

but like what did it print

shy dust
#

the number

lyric leaf
#

which was

shy dust
#

374175519

lyric leaf
#

The number is to big

#

did it also print that it is Secret Rng?

shy dust
#

i realized

#

why

#

omg im so dumb

#

cuz if the number is smaller than nothing's chance then it doesnt do anything

#

i gotta fix that

lyric leaf
#

yuh

shy dust
#

what does return do

lyric leaf
#

alr let me make some examples so you can understand better

shy dust
#

wait

#

but i want to do if the secret rng generates too big number it will return

#

and roll again

#

or idk

#

i might know

#
        RollValue.Value = rng
    elseif secretrng < rng then
        SecretValue.Value = secretrng
    elseif secretrng > rng then
        RollValue.Value = rng
    else
        print("Error Code: 2")
    end```
#

this?

#

1010101 and lower is the chance of nothing

lyric leaf
#

Return basicly gives a function a value for example:

local function Addition(a, b)
  local c = a + b
  return c
end

local OnePlusOne = Addition(1, 1) -- (2)

Return also stops a function so for example.

local function Addition(a, b)
  local c = a + b
  if c then
    return c
  end
  print("c was 0")
  
end

local OnePlusOne = Addition(1, 1) -- (2)

In this Example print("") was not executed

shy dust
#

so anything higher will just make it roll rng instead

#

oh

#

right?

lyric leaf
#

uh let me think

lyric leaf
#

i think so. I mean as long as SecretRng is smaller than the Nothing rarity

lyric leaf
shy dust
#

thats so weird but whatever

#

is there any way to reset leaderstats data?

lyric leaf
#

yeah

#

You use Profile Store or Data Store?

shy dust
#
local DataStore = game:GetService("DataStoreService")
local LeaderboardDataStore = DataStore:GetDataStore("LeaderboardDataStore")

game.Players.PlayerAdded:Connect(function(player)
    local leaderstats = Instance.new("Folder", player)
    leaderstats.Name = "leaderstats"

    local Rarity = Instance.new("NumberValue", leaderstats)
    Rarity.Name = "HighestRarity" 

    local Rerolls = Instance.new("NumberValue", leaderstats)
    Rerolls.Name = "Rerolls"

    local UserId = player.Name.." - "..player.UserId

    local success, data = pcall(function()
        return LeaderboardDataStore:GetAsync(UserId)
    end)

    if success and data then
        Rarity.Value = data.Rarity or 0
        Rerolls.Value = data.Rerolls or 0
    else
        Rarity.Value = 0
        Rerolls.Value = 0
    end
end)

game.Players.PlayerRemoving:Connect(function(player)
    local UserId = player.Name.." - "..player.UserId
    local data = {
        Rarity = player.leaderstats.HighestRarity.Value,
        Rerolls = player.leaderstats.Rerolls.Value
    }

    local success, errormessage = pcall(function()
        return LeaderboardDataStore:SetAsync(UserId, data)
    end)

    if not success then
        warn("Failed to save data for "..player.Name.." - "..errormessage)
    else
        print("Successfully saved data for "..player.Name)
    end
end)```
i literally use what you once gave me
#

yeah its datastore

#

@lyric leaf ?

lyric leaf
#

there is an inbuild function for DataStores called DataStore:RemoveAsync()

shy dust
#

ok

#

and?

lyric leaf
#

or you could also go to roblox website and remove it there i think

#

hold up

#

nvm i just gave you the datastore manager form my expierence mb

#

here this should do it

#

then just click on your game

shy dust
#

im in the data stores tab

#

i mean i have that data in studio

#

why is there 100mb storage limit

#

does that mean that some ppl wont event save their data?

lyric leaf
#

I don't think your gonna be reaching that limit any time soon

#

and i think you can expand it later

shy dust
#

fair enough

#

what is global os

#

ps

#

anyway yeah i removed my data

lyric leaf
#

global ps? or os?

#

Because i have no idea what ps is

shy dust
#

neverminfd

#

so if i want to set default value of leaderstats to something can i just do
rarity.value = 0

lyric leaf
#

should do that automaticly but yeah

#

you could

shy dust
#

oh yeah

#

but if i want it to be 1

#

ot smth

lyric leaf
#

Just change the 0 to the number you want

shy dust
#

no but liek when you first join

#

not every time

lyric leaf
#

yeah

#

change the 0s

#

but only for the else

#

so these

#

because these values are the values that are set when there is no data found (Or the data could not be loaded)

shy dust
#

it still make it 0

#

when i first join

lyric leaf
#

is it really your first join?

shy dust
#

well after i reset my data

lyric leaf
#

then it should set the Rarity.Value to whatever is here

shy dust
#

idk why

#

but

shy dust
#

@lyric leaf

shy dust
#

idk why it rounds up

#

i gtg but if you know solution just say it and ill read it later

lyric leaf
#

I lowkey have no idea as well. For me it works just fine. Have you tried setting it Manually just to check?

shy dust
#

yo i got a problem

#
Change.OnServerEvent:Connect(function(Player, Rarity)
    local Character = Player.Character
    local Humanoid = Character:WaitForChild("Humanoid")
    local Animator = Humanoid:FindFirstChildOfClass("Animator")
    local StarstrikeAnimation = Instance.new("Animation")
    StarstrikeAnimation.AnimationId = "rbxassetid://110028722881882"
    local StarstrikeAnimationPlay = Animator:LoadAnimation(StarstrikeAnimation)
    if Rarity == "Common" then
        Equip:Fire(Player, "Common")
        print("Common Equipped")
    elseif Rarity == "Uncommon" then
        Equip:Fire(Player, "UnCommon")
        print("UnCommon Equipped")
    elseif Rarity == "Rare" then
        Equip:Fire(Player, "Rare")
        print("Rare Equipped")
    elseif Rarity == "Starstrike" then
        Equip:Fire(Player, "Starstrike")
        print("Starstrike Equipped")
        StarstrikeAnimationPlay:Play()
    end
end)```
everytime i equip starstrike the animation doesnt play
#

this is the part of the serverscript

#

the rarity equips but the animation doesnt play

#

idk why

#

@lyric leaf

lyric leaf
#

Oh yeah you need to play that animation on the client.

#

Because Animations can't be played on the server for Parts with NetworkOwnerShip

#

So you either set the NetworkOwnerShip to nil (Which is not that good if its a player) or you just use a RemoteEvent

gloomy fiber
#

theres no way this is still going on

lyric leaf
lyric leaf
potent sentinel
#

1400+ responses be like:

potent sentinel
shy dust
#

Lexcept the client

lyric leaf
#

Everybody will see them. IF the client owns that part

shy dust
#

bro what

#

oh

lyric leaf
#

That is also why exploiters can do these weird animations (If you have ever seen them on social media)

lyric leaf
#

Btw i'll be gone for week from this day on

#

Just so you know why i won't be replying

shy dust
#

@lyric leaf

#
    local Character = Player.Character
    local Humanoid = Character.Humanoid
    local Animator = Humanoid:FindFirstChildOfClass("Animator")
    local VoidAnimation = Instance.new("Animation")
    VoidAnimation.AnimationId = "rbxassetid://133397604937238"
    local VoidTrack = Humanoid:LoadAnimation(VoidAnimation)
    
    if Rarity == "Void" then
        VoidTrack:Play()
    end
end)```
#

idk why but it gives me error attempt to nil with humanoid

#

its a local script

lyric leaf
#
local Player = game.Players.LocalPlayer

Animate.OnClientEvent:Connect(function(Rarity)
    local Character = Player.Character
    local Humanoid = Character.Humanoid
    local Animator = Humanoid:FindFirstChildOfClass("Animator")
    local VoidAnimation = Instance.new("Animation")
    VoidAnimation.AnimationId = "rbxassetid://133397604937238"
    local VoidTrack = Humanoid:LoadAnimation(VoidAnimation)
    
    if Rarity == "Void" then
        VoidTrack:Play()
    end
end)
shy dust
#

ok ill try that

#

it work

shy dust
#

yo uhh can we work on the message system thing

lyric leaf
#

You sure you want to use robloxes Inbuild text messages?

#

because idk if they will still display to everyone

shy dust
#

i think they do

lyric leaf
#

for what do you even want to use that

shy dust
#

wait

#

i might know

lyric leaf
#

?

shy dust
#

i mean i can just make a board that will show the rolls

#

yeah

#

i can make that i hope

lyric leaf
#

alr

shy dust
#

@lyric leaf i have a problem

#

when i try to change leaderstat to a decimal like 0.01 it just makes it 1, i use number value to store the leaderstats how do i make it so it sets it to the actual number?

lyric leaf
#

Idk. I normaly just make my own leaderstats system with my own gui

shy dust
#

but how do i fix this bruhhh

lyric leaf
#

make a new post on scripting help

#

maybe someone can help

shy dust
#

@lyric leaf

lyric leaf
#

yo

shy dust
#

if i do if RarityLeaderstat.Value <= 100 and not 0.35 or 0.13 then does it do so it only does the function if the value is under 100 and is not 0.35 and 0.13 right?

#

@lyric leaf

lyric leaf
shy dust
#

if RarityLeaderstat.Value <= 100 and not 0.35 or 0.13 then

#

wait

#

why ~=

#

??

lyric leaf
#

~= means not for ==

shy dust
#

oh

lyric leaf
#

and you have to specify if you want

if (RarityLeaderstat.Value <= 100 and RarityLeaderstat.Value ~= 0.35) or RarityLeaderstat.Value ~= 0.13 then

or

if (RarityLeaderstat.Value <= 100 and RarityLeaderstat.Value ~= 0.35) or (RarityLeaderstat.Value <= 100 and RarityLeaderstat.Value ~= 0.13) then
```#
#

but i think you want the second option

shy dust
#

@lyric leaf can i just dm you whenever ill have a problem i kinda hate it here

shy dust
#

idk ppl are confused when they see 1k+ message post and 2 dudes just occasionally talking here

lyric leaf
#

fair enough

shy dust
#

but if you have a problem with that ig well stay in this post

lyric leaf
#

no no i was just wondering

#

you can dm me anytime