You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
I need to clone a screenGUI from server storage.
What is the issue? Include screenshots / videos if possible!
Error is:
but:
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I tryed to clone from workspace, but got something more strange for me
My code:
local PlayerService = game:GetService("Players")
local Player = PlayerService.LocalPlayer
local GuiService = Player.PlayerGui
local GameGUI = GuiService.GameGUI
local PlayableFrame = GameGUI.GameFrame.PlayableFrame
local RNGBar = GameGUI.GameFrame.PlayableFrame.RNGBar
local RNGProgress = RNGBar.RNGP
local RNGBarFiller = RNGBar.Filler
local RNGClicker = script.Parent
local RNGMultiValue = script.Parent.RNGMulti
local RNGNumber = 0
local ClickWait = 0
local debounce = false
local RNGnumbern = 10
local FullF = 1
local Filler1Part = 1/RNGnumbern
local FillerProgress = 0
local Points = game.Players.LocalPlayer.leaderstats.Points
local GotAPoint = game.ServerStorage["GotAPoint!"]
local GotAPointLabel = game.ServerStorage["GotAPoint!"].TextLabel
local Xpcoor = math.random(0.1,1)
local Ypcoor = math.random(0,1,1)
RNGClicker.MouseButton1Click:Connect(function()
if debounce then
return
end
debounce = true
RNGNumber = math.random(1,10)
RNGProgress.Text = RNGNumber.."/"..RNGnumbern
ClickWait = 20
FillerProgress = (RNGNumber * Filler1Part)
print(FillerProgress)
RNGBarFiller.Size = UDim2.new(FillerProgress,0,0,100)
if RNGNumber == RNGnumbern then
Points.Value = Points.Value + 1
RNGProgress.Text = (0).."/"..RNGnumbern
RNGBarFiller.Size = UDim2.new(0,0,0,100)
local GotAPointClone = GotAPoint:Clone()
GotAPoint.Parent = PlayableFrame
GotAPointLabel.Position = UDim2.new()
end
repeat
ClickWait -= 1
RNGClicker.Text = (math.round(ClickWait - 1)/10)
wait(0.1)
until ClickWait <= 0.3
ClickWait = 0
RNGClicker.Text = "Click to Generate!"
debounce = false
end)
Uhhh idk how to say that right, just like clone text when player make a thing which needed and that text will go up. So i need to clone it to make it more whan 1 time
You can only access the “ServerStorage” folder from a server script, the “ReplicatedStorage” folder on the other hand can be accessed from both local scripts and server scripts.
local GotAPoint = game.ServerStorage:WaitForChild("GotAPoint!")
local GotAPointLabel = GotAPoint:WaitForChild("TextLabel")
Replace those 2 lines with these 2 if the script is a server script already.
If it is a local script and moving the “Gui” to “ReplicatedStorage” doesn’t work then try the following 2 lines of code:
local GotAPoint = game.ReplicatedStorage:WaitForChild("GotAPoint!")
local GotAPointLabel = GotAPoint:WaitForChild("TextLabel")