Did I do this correctly?

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I’m making a tycoon game and using a youtube tutorial to write the script
  2. What is the issue? Include screenshots / videos if possible!
    I have no idea if I did this right because it doesn’t seem to be doing the same thing in the youtube video

Video: How to make a Tycoon in Roblox #1 - Basic Setup - YouTube

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I haven’t really tried anything yet as there’s really no way to just look up if its correct or not
    After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

Tycoon Script:

local template = game:GetService("ServerStorage").Template

local function NewModel(model, CFrame)
	local NewModel = model:clone()
	NewModel:SetPrimaryPartCrfame(CFrame)
	NewModel.parent = workspace
	return NewModel
end

local Tycoon = {}
Tycoon.__index = Tycoon

function Tycoon.new(player)
	local self = setmetatable({}, Tycoon)
	self.Owner = player
	
	return self
end

function Tycoon:Init()
	self.Model = NewModel(template, CFrame.new(0, 1, 0))
end

function Tycoon:Destroy()
	self.Model:Destroy()
end

return Tycoon

Server Script:

local Tycoon = require(script.Parent.Tycoon)

game:GetService("Players").PlayerAdded:Connect(function(player)
	local tycoon = Tycoon.new(player)
	tycoon:Init()
end)

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

1 Like

The p should be uppercase

NewModel.Parent
2 Likes

I tried that and it still didn’t work… I’m honestly just not sure what to do because I have no idea how to fix it, because I could’ve sworn I did it exactly like in the video

I’ll look at it soon, give me a minute or two.

Okay, sounds good and thank you in advance