Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do i fix this?

Asked by 10 years ago
local function Ghostify(Part)
Part.Transparency = 1
wait(4) 
then Part.Transparency = 0.7
0
Remove "then". That is only used in if statements. emite1000 335 — 10y
0
Can I insert the script into a part? Or will that break the script? smashfighter2 0 — 10y

2 answers

Log in to vote
0
Answered by 10 years ago

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
Ad
Log in to vote
0
Answered by 10 years ago

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

Answer this question