Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do i fix this?

local function Ghostify(Part)
Part.Transparency = 1
wait(4) 
then Part.Transparency = 0.7

2 comments

0

Remove "then". That is only used in if statements.

0

Can I insert the script into a part? Or will that break the script?

2 answers

Here:

local function Ghostify(Part)
game.Workspace.Part.Transparency = 1 -- assuming the Part is named "Part" and is in the Workspace
wait(4)
game.Worspace.Part.Transparency = 0.7 

end 

Ghostify() ---Calls the function 

now I'm not the world's best scripter but I think that is it.

You could also shorten it by doing this:


local function Ghostify(Part)
Part = game.Workspace.Part
Part.Transparency = 1 
wait(4)
Part.Transparency = 0.7 

end 

Ghostify() ---Calls the function 

Well, I have a script that doesn't involve functions. Here:

Part = game.Workspace
while true do --Delete this if you dont want it to be repeated
Part.Transparency = 1
wait(4)
Part.Transparency = 0.7

This is just a script that doesn't involve functions

This discussion is preserved as it was. New answers, comments, and votes are closed.