When I click a textbutton, I want "Koenigsegg One:1" to clone into workspace and hover over the player that click the button head, it does not clone though.
script.Parent.MouseButton1Click:connect(function()
game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function(char)
local C = game.ReplicatedStorage.Cars:WaitForChild("Koenigsegg One:1"):Clone()
C.Parent = game.Workspace
C:MoveTo(char.HumanoidRootPart.Position + Vector3.new(3, 0, 3))
end)
end)
end)
Thanks if you help me :)

3 comments
PlayerAdded doesn't work in a localscript.
This is a normal script though
It doesn't clone because you never actually clone it. You just connect the events (Player- and CharacterAdded). But you don't need the events, just get rid of them. And you should ALWAYS use a LocalScript when working with GUIs.