Help Needed With What I Suppose is a Simple Script

  1. What do you want to achieve? to be able to make 2 parts appear and a part to attach to the mouse when a player has clicked and disappear once clicked again.

  2. What is the issue? i dont know scripting and i dont really know what to do

  3. What solutions have you tried so far? i came here for help

my script so far

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local workspace = game:GetService("Workspace")

local mt = ReplicatedStorage.MouseTarget
local atp = ReplicatedStorage.AttachToPlayer

script:Pappear()
mt:Clone().Name = "mtclone"
mtclone.parent = game.Workspace

i am not asking for an entire script but for some help on how i can make it a bit simple for me to accomplish.

the mtclone.parent part gets red lined and i dont really know why so some help would be nice!

some screenshots

image


(the MouseTarget And AttachToPlayer were in replicatedstorage)

2 Likes

The reason why the script doesn’t know what’s mtclone is that you never tell the script what’s mtclone try using local mtclone on the line where you clone the mouse target
that would be:

local mtclone = mt:Clone()

mtclone.Name = "mtclone"

also, parent uses a capital

2 Likes

thanks so much for the help! :smiley:

4 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.