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

Why is this frame not a member of screengui?

Hello this is really confusing it use to work for me now it doesn't? heres my attempt

t = script.Parent.Touched:Connect(function()
t:Disconnect()
local g = script.gui:Clone()
g.Parent = game.Players:GetPlayerFromCharacter(hit.Parent).PlayerGui
wait()
for i = 1,50 do
g.frame.BackgroundTransparency = g.frame.BackgroundTransparency - 0.02
wait(0.01)
end
end)

This clone's into the players playergui but as soon as it tries to change the frame it has this error

f is not a valid member of ScreenGui
Stack Begin
Script 'Workspace.touchy.hit', Line 6
Stack End

My guess is the frame is not loading fast enough but it still doesn't make sense still it's a clone it's not loading anything ;/

2 comments

0

Is it because the frame name has a cap at the start?

0

try changing 'frame' to 'Frame'

1 answer

✓ Accepted answer

Hello, fistter1

I've made this script for you

I hope this works:

t = script.Parent.Touched:Connect(function()
t:Disconnect()
local g = script.gui:Clone()
g.Parent = game.Players:GetPlayerFromCharacter(hit.Parent).PlayerGui
wait()
for i = 1,50 do
g.Frame.BackgroundTransparency = g.Frame.BackgroundTransparency - 0.02
wait(0.01)
end
end)

I think it was not working because "Frame" is set to "frame".

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