#My script for making a model disappear not working
1 messages · Page 1 of 1 (latest)
Where is the script
I had to delete it cause it was in my model script, and I should of put it in the starterplayerscript but it was too late as i already deleted it
Put a script in your model:
local part = script.Parent
part.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
part.CanCollide = false
end
end)
done
Did it work
:c no
i try looking online for other forums to see if someone had posted the same thing im doing but its all for global
Why would u want it to be individual
so players cant troll other players when doing the obby
Then do it in a localscript
alrighttt
what about script.Parent.Touched:Connect(function()
task.wait(0.5)
script.Parent.CanCollide = false
end)
** You are now Level 1! **
its transparency as well
💀
I think she knows how to do that
Thats why i didnt put
And that is just a part. Since theres a lot of platforms you would need collection service and tween its transparency. @flint trellis
I mean if I was crashing out if someone sends me a script im ctrl c ctrl v ong
lol
part.transparency = 1 🙀
If you set transparency and cancollide instantly then the player wouldnt even have time to jump again before the platform disappears
wat are u even saying 💔
i'm not sure anymore. it's hurting my brain too much and I think i need a break from scripting as i been doing it for 6 hours straight 😭
** You are now Level 2! **
cancolide would be as instant as transpanecy all it means is they act know if its gone or not
wtf are you on
imagine a player jumps on a part and they fall through it and they dont know why
💀
Thats why i said to use tweening wtf are u on
yallll chillll its all goodd
tweening is not needed
And set cancollide to false after tween is completed
there js being disabled
How else would you make it slowly disappear
its just for my obby game 
you dont need to slowly make it disapear
yeah but there overcomplicating it
Oh wait this is a rage bait
ur the one ragebaiting
part is invisible for so long wait part goes inviisble/cancolide off repeat
you can tween if you want to but its unessessary
hi
espically if its a beginner
can u guys help me
surr
create ur own post?
is the part being made from a local script or is it a normal part
real
naur its many parts into one
repeat part.Transparency +=0.1
until part.Transparency = 1
part.CanCollide = false
If thats what youre saying but still use collectionservice
thats literally incorrect but that doesnt matter, idk how local parts work exactly but if its in the workplace which i assume it is than it wont work per player
You could fact check me but pretty sure u need to make player sided objects or smth
otherwise server script would only work pretty sure
or im cooked
then where would i move it then? I was told by my friend to leave it in workspace (the model) and make a local script in starterplayer>startplayerscripts
he also sent me a script to paste in there, sending it rn
I mean I havent used/made player sided objects before
-- LocalScript inside StarterPlayerScripts
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
-- Folder in Workspace with all ghost models
local ghostFolder = workspace:WaitForChild("Pixel ghost fading parkcore")
-- Hide originals so they don’t interfere
for _, model in ipairs(ghostFolder:GetChildren()) do
if model:IsA("Model") then
local part = model:FindFirstChild("Pixel ghost fade away")
if part and part:IsA("BasePart") then
part.Transparency = 1
part.CanCollide = false
part.CanTouch = false
end
end
end
-- Function to fade a part
local function fadePart(part)
-- Fade out
for i = 0, 1, 0.1 do
part.Transparency = i
task.wait(0.05)
end
part.CanCollide = false
-- Respawn after delay
task.wait(3)
part.Transparency = 0
part.CanCollide = true
end
-- Clone and set up local ghosts
for _, model in ipairs(ghostFolder:GetChildren()) do
if model:IsA("Model") then
local part = model:FindFirstChild("Pixel ghost fade away")
if part and part:IsA("BasePart") then
local clone = part:Clone()
clone.Parent = workspace
clone.CFrame = part.CFrame
clone.Anchored = true
clone.CanCollide = true
clone.CanTouch = true
-- Detect stepping
clone.Touched:Connect(function(hit)
if hit.Parent == character then
if not clone:GetAttribute("Disappearing") then
clone:SetAttribute("Disappearing", true)
fadePart(clone)
clone:SetAttribute("Disappearing", false)
end
end
end)
end
end
end
this is what he told me to paste, does not work
Ok this is definitly ai and your for , model in ipairs(ghostFolder:GetChildren()) do is is incomplete
There is no indexname
0.0
do u know how to make client objects?
Localscripts obviously
🤦
ok explain
By client objects u mean parts only seen by client i assume
yes

apprantly im stupod
r all ur parts in that folder?
yes
Wouldnt it be client sided if u create them in localscripts
well yes but I thought it wouldnt work for some reason if u clone it but apprantly it does
😔
did u put ur friends script in startwrgui
oh starterplayer
lol
try startergui
oh its the samw
same thing? doesnt disappear?
as in it works in either
ngl yeah it looks like the script doesnt work
😔
Your for loop when you iterate over a table is wrong

intermission
Ok your ai code is completely wrong.
It is searching for a BasePart
Which from your screenshot is it a union
And your for , in model:GetChildren() there are no variable before and after the comma
Which will error
You need the index variable if youre iterating in a table
@flint trellis
It randomly gets the model
Which the model variable does not exists
Add i, model in ghostFolder:GetChildren()
If ur a builder thats fine ig but if you wana learn stuff lemmy know I can add comments to it.
||```
local folder = game.ReplicatedStorage.replacemewithfoldername
local debounce = false
-- Function to fade a part
local function fadePart(part)
if debounce == true then
return
end
debounce = true
-- Fade out
for i = 0, 1, 0.1 do
part.Transparency = i
task.wait(0.05)
end
part.CanCollide = false
-- Respawn after delay
task.wait(3)
part.Transparency = 0
part.CanCollide = true
debounce = false
end
for _,i in folder:GetChildren() do
if i:IsA('Model') == false then
return
end
local clone
for _,i in i:GetChildren() do
clone = i:Clone()
clone.Parent = workspace
end
function ontouched(hit)
if hit.Name == 'Handle' then
return
end
if hit.parent:IsA('Model') then
fadePart(clone)
end
end
clone.touched:connect(ontouched)
end
Put the folder in replicatedstorage when you wana test and when u building put it in workspace so you can see it
I built my obby on my own as a first timer and I’m doing super well, but the scripting is what I’m learning rn and it’s so hard to script stuff when I have no idea how to. I just been using YouTube and Roblox forums or Reddit. I don’t have friends that are devs so
I’ll try this tomorrow. As I just got off my pc
** You are now Level 3! **
This is the first episode and beginning to become a Roblox Scripter/Game Developer! With 3 playlists (Beginner, Advanced, GUI) containing 50+ videos and 30+ hours of content, I will guide you through this journey to start making the games you want to create on Roblox!
DISCORD 📜
Join my Discord Community if you want scripting help, participat...
All good. And to learn this series is up to date and roblox documentation is good as well.
You can use the code if you want temporarily but if you're trying to learn you should try make ur own one.
https://create.roblox.com/docs/reference/engine
Search for whatever you would like scripting wise and it should be there.
His videos I watched before, IMO he was too slow for me 😭😭 idkkkk
Oh thxssssss
You can skip through parts but yeah. I think I watched his series and got burnt out cause you don't learn heaps but it has good basics ig idk.
Also fyi stay away from pasting stuff you don't understand
like if you paste a 100 line script and you dont know anything like thats cooked
Ya will do, I learned the hard way with using free models on the Roblox studio… I ended up having a virus on my game 😭
Now I have only my models I built in my game
yep exactly 💀 but also they js suck fr idk
** You are now Level 6! **
nice
Im much better with building it’s more fun but the scripting just hurts my head