So, before I was trying to make a part appear in the workspace and then disappear. It clearly didn't work before but now it does (thanks to moo1210 for explaining it to me). But now, I want to make the part reappear again after it destroyed itself from the workspace. It didn't work, instead it gives me an error saying, " 13:55:55.919 - The Parent property of JumpBoost is locked, current parent: NULL, new parent Workspace". Here's my script (it is located in the ServerScriptService):
local jumpBoost = game.ReplicatedStorage:FindFirstChild("JumpBoost")
local clonedJumpBoost = jumpBoost:Clone()
clonedJumpBoost.Parent = workspace
local boostedJumpPower = 100
local function onPartTouch(otherPart)
local partParent = otherPart.Parent
local humanoid = partParent:FindFirstChildWhichIsA("Humanoid")
if ( humanoid ) then
clonedJumpBoost.CanCollide = false
local currentJumpPower = humanoid.JumpPower
if currentJumpPower < boostedJumpPower then
humanoid.JumpPower = boostedJumpPower
clonedJumpBoost:Destroy()
wait(5)
if clonedJumpBoost.Parent ~= workspace then
clonedJumpBoost.Parent = workspace
end
humanoid.JumpPower = currentJumpPower
end
end
end
clonedJumpBoost.Touched:Connect(onPartTouch)

2 comments
just change its transparency
okay thx for telling me