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

I need help with simple cloning?

Asked by 8 years ago
a = script.Parent.Parent.Parent.Parent.Parent.Character
l = game.Workspace.lol.Button.CFrame
local player = game.Players.LocalPlayer
function b ()
local storage = game:GetService("ServerStorage")
local part = storage["Seat"]:Clone() 
part.Parent = player
a.Torso.CFrame = l
wait(3)
script.Parent.Parent.Visible = false
end

script.Parent.MouseButton1Down:connect (b)

_________________________________________________________________________ the variable part is the seat, what the problem is is that the seat gets cloned into the Players Service player instead of the Workspace player. I don't know how to re-write or rather don't know what to do

0
all this is taking place inside a gui in a local script WealthyDrakor 15 — 8y
0
just added .Character after LocalPlayer in the player variable declaration see if that works ProfessorSev 220 — 8y
0
Ok! so yes, professor that worked, but the player doesn't TP to the seat, like the seat is somewhere else in the workspace. I need the player to tp to the seat WealthyDrakor 15 — 8y

1 answer

Log in to vote
0
Answered by
AZDev 590 Moderation Voter
8 years ago

I assume you want the part to be placed in the players character.

In this case part.Parent would be player.Character

Hope this helps.

0
yes that worked but now i need the player to TP to the seat because the seat is just somewhere in workspace, how would i do this using CFrame? WealthyDrakor 15 — 8y
0
Can you place the seat where the player is already at? AZDev 590 — 8y
0
Can you accept this answer? AZDev 590 — 8y
0
To CFrame the part to the characters position you can add this: "part.CFrame = char.Torso.CFrame + char.Torso.CFrame.lookVector * 2" Add this before part.Parent. I tested this in studio and it should work. AZDev 590 — 8y
Ad

Answer this question