Oh. That would be a big problem.
Why do you need the item on the client again?
Why do you even need the item on the client anyways
I am making a system where items will spawn randomly, and I want every player to see a ui popup saying what item spawned, so I need the localscript to know what that item is
then just send the item name lol
Then you could just fire the name of the object lol
exactly what I said
wdijwqoidjoijqqwdqwd
Bro i think we are telepathic lol
I SAID IT FIRST
JSJSKSKEKDjsjsjsj
It has to be a random value from a table tho, so that wouldnât work
Server
local item = items[math.random(1,#items)].Name
Client
TextLabel.Text = item
Iâve already said this before, you can make the server pass the random valueâŚ
Just use this please dont make it more complicated
Im gonna keep this simple.
Server:
local items = game.ReplicatedStorage.SwordDisplays:GetChildren()
local ts = game:GetService("TweenService")
local spawns = game.Workspace.Map["Sword spawns"]:GetChildren()
local ss = game:GetService("SoundService")
while wait(10) do
ts:Create(ss.Music, TweenInfo.new(2), {Volume = 0}):Play()
wait(2)
local currentTime = ss.Music.TimePosition
ss.Music:Stop()
ss.ItemSpawnSound:Play()
local item = items[math.random(1,#items)]:Clone()
local spin = script.Spin:Clone()
spin.Parent = item
spin.Enabled = true
game.ReplicatedStorage.ItemSpawnClientEvent:FireAllClients(item.Name)
local location = spawns[math.random(1,#spawns)]
task.spawn(function()
local part = Instance.new("Part")
part.Anchored = true
part.CanCollide = false
part.Shape = "Cylinder"
part.Size = Vector3.new(1000,5,5)
part.Orientation = Vector3.new(0,90,90)
part.Position = location.Position
part.Transparency = 0
part.Material = Enum.Material.Neon
part.Color = item:WaitForChild("Color").Value
part.Parent = workspace
ts:Create(part,TweenInfo.new(2), {Transparency = 0}):Play()
wait(6)
ts:Create(part,TweenInfo.new(2.5), {Transparency = 1}):Play()
wait(2.5)
part:Destroy()
end)
item.Position = location.Position
item.Parent = workspace
wait(2)
ss.Music.TimePosition = currentTime
ss.Music:Play()
ts:Create(ss.Music, TweenInfo.new(2),{Volume = 0.25}):Play()
end
Client:
game.ReplicatedStorage.ItemSpawnClientEvent.OnClientEvent:Connect(function(item)
Yourtextlabel.Text = item
end)
If you are still insistent on passing the item from the server to the client: You should try adding another line that sets the parent of the object to replicated storage, as you forgot to add that.
U stole my code ggeerrmrkejekdjdne
I fixed it by sending the value to the client and placing a clone onto the map, uh who do i give solution uhhhh euihardfsidz
I SAID IT FIRST KSJndmsmsksksmSKSKWKWK
but idc tbh lol sorry sjsjsjsmekdkems
I guess it doesnât matter too much.
Glad youâve got something working!