Well well well… Another time when code has intimidated me, and i have no clue what i’ve done wrong, let alone if i started out right.
I want to make a card game. Each card is a Frame, with stuff such as the Value which will indicate the description of the card, the Name of the person who the card is about, etc. The game is supposed to pick a ‘card’ at random, and display it to the Player.
So with my basic Scripting knowledge, i decided to create a Script, which went by the name of ‘RunTimeBroker’ (first thing that came to my mind when naming it), followed by a Module Script that was name ‘RunTime’ as its child.
The way i thought about making it, was that i would put the ScreenGui in ReplicatedStorage, and when a few seconds have past after the player has joined, and the script has decided which card to display, it clones the GUI into StarterGUI.
This gives me an error:![]()
This is my code for the ModuleScript:
local module = {}
function module.ChooseCharacter()
local rand = Random.new()
local Card = game.ReplicatedStorage.Cards
local ChosenCharacter = Card[rand:NextInteger(1, #Card)]
print(ChosenCharacter)
return ChosenCharacter
end
return module
And here is the Parent of that ModuleScript, the normal Script:
local C = require(script.RunTime)
wait(5)
local ChosenCharacter = C.ChooseCharacter()
local CloneCharacter = ChosenCharacter:Clone()
CloneCharacter.Name = "CurrentIssue"
CloneCharacter.Parent = game.StarterGui:FindFirstChild("Cards")
Both the Module Script and the Script are in ServerScriptService.
Thanks for your time
(sorry for the enormously long post, i just wanted to give context…)