Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

How can I fix this? (No one has been able to help me!!)

Asked by 9 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

I'm having troubles cloning an object from replicatedstorage and moving it to workspace, and positioning it when a character touches a brick created from the script Instance.new("Part", workspace)

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

 tut = Instance.new("Part",workspace)

tut.Name = "tutorial"

tut.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!"
tut.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 clon = game.ReplicatedStorage.Sofa:Clone()
clon.Parent = game.Workspace
clon:MoveTo(Vector3.new(3.301, 0.7, 36.088)) 
wait(.2)
player.Character.Torso.Anchored = false
    end


tut.Touched:connect(onTouched) 


1
I have tried storing the object in lighting, serverstorage, and replicatedstorage. SmokeyIsSmoking 0 — 9y
1
What doesn't work? What is happening instead? Is there output? Have you done *any* debugging? BlueTaslem 18071 — 9y

Answer this question