I didnt know how to approach it so i tried this, it gives me a error saying that plr is not a valid member of workspace, how can i achieve finding the player model through a script?
The script:
local Debounce = false
local plr = game.Players.LocalPlayer.Name
local Clone = game.Workspace.plr:Clone()
function onKeyPress(actionName, userInputState, inputObject)
if userInputState == Enum.UserInputState.Begin then
print("Cloned")
Clone.Humanoid:Destroy()
Clone.Parent = game.Workspace
Clone.Position = game.workspace.plr.Position
end
end
game.ContextActionService:BindAction("keyPressSpecialName", onKeyPress, true, Enum.KeyCode.Q)
game.ContextActionService:SetPosition("keyPressSpecialName", UDim2.new(.5,0,-.5,0))
game.ContextActionService:SetImage("keyPressSpecialName", "rbxassetid://73737626")
