Hi, I am trying to make a script that makes a part (sharingan) summon in front of my player. But there is an issue, when ever I click F the part summons only on the position that I spawned on.
Extra Question: How do I make the sharingan clone properly. When I use :Clone() the sharingan does not clone itself and the sharingan also does not teleport.
But when I dont clone the sharingan, then the sharingan only teleports to the spawn.
Here is my script:
local player = game.Players.LocalPlayer
local character = player.CharacterAdded:wait()
local humanoid = character.Humanoid
local postion = character.Torso.Position
local activate = player.PlayerScripts.Sharingan.Activated
local sound = player.PlayerScripts.Sharingan.Ssound
local sound2 = player.PlayerScripts.Sharingan.SsoundDeactivate
local sharingan = game.Workspace.Sharingan:Clone() --how do I fix this?--
local chakra = player.PlayerGui.SharinganImage.Chakra
local chakraimage = player.PlayerGui.SharinganImage.ChakraText
local mouse = player:GetMouse()
mouse.KeyDown:connect(function(key)
if key == "f" then
if activate.Value ==false then
if chakra.Value > 50 then
sound.TimePosition = 0
sound.Playing = true
sharingan.Position = Vector3.new(postion)
activate.Value = true
print("ON!") --delete this soon--
humanoid.MaxHealth = 200
humanoid.Health = 200
humanoid.WalkSpeed = humanoid.WalkSpeed + 30
chakra.Value = chakra.Value - 50
chakraimage.Text = chakra.Value
end
else
activate.Value = false
print("OFF!") --delete soon!--
humanoid.MaxHealth = 100
humanoid.Health = 50
humanoid.WalkSpeed = 16
end
end
end)

2 comments
Mouse.KeyDown is deprecated.
Try to use CFrame instead and does it set the parent to workspace, etc