Everytime i try to fire a client it doesnt work
local script:
local plr = game.Players.LocalPlayer
local stand = plr:WaitForChild("Stand")
local event = game.ReplicatedStorage.Stands:WaitForChild(stand.Value):WaitForChild("Summon")
local gui = game.ReplicatedStorage.Stands:WaitForChild(stand.Value):WaitForChild("Cooldowns").Cooldown
event.OnClientEvent:Connect(function()
local newgui = gui:Clone()
local bar = newgui.Background.Top
newgui.Parent = plr.PlayerGui:WaitForChild("CooldownHolder"):WaitForChild("Holder")
bar:TweenSize(UDim2.new(0.033, 0, 0.529), Enum.EasingDirection.In, Enum.EasingStyle.Linear, 1.5, true)
wait(1.55)
newgui:Destroy()
end)
part of server script:
game.ReplicatedStorage:WaitForChild("Stands"):WaitForChild(standvalue.Value).Summon:FireClient(plr)
i rarely use :FireClients()
If you add a print in the .OnClientEvent function does anything print?
Also are you sure that the value you are selecting to fire to the client is correct? Could you show inside of the Replicated storage folder?
1 Like
nope nothing printing
no errors either
i tried changing the name and nothing is working
What is inside of the Modal called “Stand”?
I don’t understand this part.
its a value for a thing called “stands” its from a anime, but its basically looking for a file name that has the same name has the value
Are you sure it does find a folder called the value of standvalue? From looking at your code that is the most likely.
well the server script it has alot of the standvalue.Value bc their is multiple stands if thats what u mean
Why are you even having lots of them? Why could you not just make one remoteEvent and then just pass through the value.
its just the way i have done it, and i thought exploiters could just easily get advantage
How could exploiters get an advantage? Your firing from a server script are you not meaning exploiters can’t affect it.
i got my words all messed up, i did it once and it was easier but idk im just used to using multiple events
Your client script must have lots of events then cuz there must be a ton of events. I would highly recommend trying my method rather then this.
well the thing is that its only gonna run off one event, so if that event gets fired it starts but it isnt
Ok I know the issue. The script runs, it gets the event from the current stand.Value but then it will not update cuz of ways scripts run they run once and then unless calling a function code does not run again.
This gets the event from the current stand.Value but then does not update the current event (or at least I guess this is the issue).