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

Why does my model's proximity prompt break upon being cloned?

Asked by 2 years ago

I'm trying to make a tool, which when clicked with, spawns a model. I've pretty much completed it, however when I spawn the model in, during playing the game via Studio, I run into a problem, where I cannot click on the proximity prompt and sit down to steer the cloned boat.

Here's me attempting to sit down on the cloned boat, then sitting down on one which was already in the workspace: https://streamable.com/pyzq6b

Here's an image of the tool in the Starterpack: https://gyazo.com/5749fcd484f351d52a772e551ae59feb

Here's an image of the script itself: https://gyazo.com/d4905f0e5e9c90daa6b6d098c87432ca

bin = script.Parent

function onButton1Down(mouse)

    local Object = bin.SpawnableObject:clone()
    Object.Parent = game.Workspace
    Object:MakeJoints()
    Object:MoveTo(mouse.hit.p)

end

function onSelected(mouse)
    mouse.Icon = "rbxasset://textures\\GunCursor.png"
    mouse.Button1Down:connect(function() onButton1Down(mouse) end)
end



bin.Selected:connect(onSelected)

I've also attempted to remove the Proximity Prompt entirely- however I cannot sit down in the seat of the cloned boat. https://gyazo.com/412a72623c509133788087136a7f506b

I think I may need to create a new Proximity Prompt upon cloning, however I'm not sure how to do this.

Answer this question