I've tried running this through output and stuff, and it's not helpful to me.
I'm having troubles getting a model to clone from server storage after a player steps on a brick that was created in Workspace through Instance.new.
The script is:
In a local script > Inside of a button > Inside of a Frame > Inside a GUI
local player = game.Players.LocalPlayer --You are using a local script so you can use LocalPlayer.
script.Parent.MouseButton1Down:connect(function()
script.Parent.Parent.Visible = false
tutorial = Instance.new("Part",workspace)
tutorial.Name = "tutorial"
tutorial.CFrame = CFrame.new(Vector3.new(3.301, 0.7, 36.088))
local g = Instance.new("Hint", workspace)
wait(.3)
g.Text = player.Name..", Step on the gray square to begin tutorial!"
tutorial.Anchored = true
wait(.3)
player.Character.Torso.Anchored = false
end)
function onTouched(part)
local a = Instance.new('Message', workspace)
player.Character.Torso.Anchored = true
a.Text = "Tutorial Loading."
wait(.5)
a.Text = "Tutorial Loading.."
wait(.5)
a.Text = "Tutorial Loading..."
local clone = game.ServerStorage.Sofa:Clone()
clone.Parent = workspace
clone:MoveTo(Vector3.new(3.301, 0.7, 36.088)) --Models don't have position. To move a model use :MoveTo(Vector3.new())
wait(.2)
player.Character.Torso.Anchored = false
end
tutorial.Touched:connect(onTouched)

1 comment
I had lighting before. It made no effect. Also, I see what you mean about the variable mix up, since i later in the same line use :Clone(). Thanks, I haven't noticed that!